Re: getting all method names
[prev]
[thread]
[next]
[Date index for 2005/04/05]
how about
use Class::DBI::Loader;
# do your DSN etc. thing per the POD
On Tue, 5 Apr 2005, Marc Lambrichs wrote:
> >>
> Mmmh. Not really what I want. I would like to write a generic data
> transfer object (look for it in [Alur2003] and [Fowler2003]) that uses a
> list of all possible methods:
its not cool to put in citations without the bibliographic references at
the end.
>
> my $object = Model::Object->retrieve( $id );
> foreach (my $object->methods){
> do_something( eval $object->$_ );
> }
try this:
my $class;
foreach $class ($loader->classes) {
do_something ( $class->$_) foreach ($class->columns);
}
(note perl way for writing simple iterator with $_)
I don't see why you would need an eval unless you want to
start doing try/catch/throw, in which case see the relevant modules...
>
>