[CDBI] Trouble with Perl's reverse function
Carlos Vicente <cvicente-zZ82ZiX1S8l+u43qRgrggVnYRNhDb3e+9nwVQlTi/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
I was wondering if anyone has seen this behavior and could give me some hints. In a class that inherits from Class::DBI, say MyApp::Class, I have a method which applies the 'reverse' function on a simple Perl array: e.g. push @foo, 'bar'; @rev = reverse @foo The result: Can't locate object method "get" via package "bar" (perhaps you forgot to load "bar"?) at /usr/lib/perl5/site_perl/5.8.7/Class/Accessor.pm line 393. This line is from make_accessor, which means that somehow the function appears to be making a method call on the element 'bar'. I'm guessing that it has something to do with the fact that Perl's reverse works 'by moving pointers around'. Would it be possible to avoid this situation (other than writing my own reverse method)? Please, if your answer is to switch a different ORM alternative, that's not an option right now. I appreciate any help. Thanks. cv