Re: getting all method names

[prev] [thread] [next] [Date index for 2005/04/05]

From: Dana Hudes
Subject: Re: getting all method names
Date: 04:32 on 05 Apr 2005
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...



> 
> 

getting all method names
mlambrichs 04:03 on 05 Apr 2005

Re: getting all method names
Dana Hudes 04:09 on 05 Apr 2005

Re: getting all method names
Marc Lambrichs 04:27 on 05 Apr 2005

Re: getting all method names
Dana Hudes 04:32 on 05 Apr 2005

Re: getting all method names
Kingsley Kerce 04:50 on 05 Apr 2005

Re: getting all method names
William Ross 08:26 on 05 Apr 2005

Generated at 09:29 on 27 Apr 2005 by mariachi v0.52