> Everything there looks right to me. One possible cause of errors like
> this may be a syntax error in a related module (e.g., Block.pm). Due
> to the way that RDBO sometimes has to defer relationship creation,
> errors in modules loaded on-demand are not always propagated. (The
> trouble is how to distinguish between a missing module or class, and
> one that exists but has errors in it.
Okay, thanks. I dont think it is a syntax error ... this works:
use Block;
my $b = Block->new(id=>1)->load();
I will try to boil it all down to find a cause of my problem. I poked around
the source and see in MakeMethods::Generic there is a $add_code dynamic
subroutine. Is this the code that should be getting executed for the
add_block sub? If it is somewhere else, could I get a pointer where to look?
> String matching on $@ is not fun...)
Heh, I agree. I would assume you have 2 main cases of errors though: module
does not exit, or syntax error. The first can be caught with:
if( $@ =~ /^Can't locate [\w\/.]+ in @INC/ ) {
warn "$mod does not exit";
}
else {
warn "$mod syntax error: $@";
}
Thanks!
-Cory
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object