[CDBI] Weird things with has_a and lazy population

Phil Mitchell phil at 2people.org
Wed Nov 16 17:58:35 GMT 2005


>
> result:
> print $domain->name; # prints test.com
> print $domain->plan; # prints 10
>
> yes thats fine, but:
> print $domain->plan->nick; # STILL EMPTY STRING!!

Try looking at what you're getting from $domain->plan. Is it a blessed
object? Do:

print ref $domain->plan;

Also:

use Data::Dumper;
print Dumper $domain->plan;

>
> and when i do such way:
> use ClientApp::Plan;
> my $plan = ClientApp::Plan->retrieve(10);
> print $plan->nick; # yes, it prints "good plan" as expected
>
> My curiousity here about "has_a", why Essential thing didn't worked with
> it ???
> Thanks for help.
>
> PS: Class::DBI version 0.96
>
> --
>
>
> _______________________________________________
> ClassDBI mailing list
> ClassDBI at lists.digitalcraftsmen.net
> http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
>


--
==========================
2People Blog: http://2-people.blogspot.com/
2People site: http://www.2people.org




More information about the ClassDBI mailing list