On Aug 7, Martin A. Hansen said: >print &dump_functions( $obj );
I'd think it's better for dump_functions() to return an array ref, and let the end-user decide how to use its contents. >sub dump_functions { > use Data::Dumper; > use Class::Inspector; > > my ( $obj ) = @_; > > my ( $ref, $methods, @methods ); You never use @methods. > $ref = ref $obj; > $methods = Class::Inspector->methods( $ref, 'full', 'public' ); > > @{ $methods } = grep /$ref/, @{ $methods }; > return Dumper( $methods ); That should probably be /^$ref/, for "safety". And I'd probably just do return [ grep /^$ref/, @{ Class::Inspector->methods(...) } ] >} -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]