On 4/30/06 2:24 PM, Michael Lackhoff wrote: > This script works perfectly well when run from the command line: > use PVonline::Therapeuten; > > sub groups_of_user { > return map {$_->name} PVonline::Therapeuten->new(nr=>1)->gruppen; > } > > print groups_of_user(); > # prints the names of all groups, user 1 is member of > > But when I do the same within a mod_perl authz handler script: > sub groups_of_user { > # called from the handler > my @groups = > map {$_->name} PVonline::Therapeuten->new(nr=>1)->load->ggruppen; > warn @groups; > # gives: use of uninitialized value in warn at ... > return @groups; > } > > gives "use of uninitialized value in warn at ..."
I can't think of any reason this would behave any differently under mod_perl. Try printing the SQL that it's running and then dumping the relevant parts of the results: # Turn debugging on temporarily local $Rose::DB::Object::Debug = 1; local $Rose::DB::Object::Manager::Debug = 1; # Get the objects my @groups = PVonline::Therapeuten->new(nr=>1)->load->ggruppen; # Assumes "id" is the primary key of the groups table. foreach my $group (@groups) { no warnings; print STDERR "GOT: ", $group->id, ': ', $group->name, "\n"; } Does that show anything interesting in the error log? -John ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object