Thanks Uri and Shlomi. The dumper works but still not getting the proper
results, please see comment in text. Thanks.


> -----Original Message-----
> From: Uri Guttman [mailto:u...@stemsystems.com]
>
> first off, learn to bottom post and edit the quoted emails. i deleted
> tons of stuff below this.
[CHAN] Thanks for the advice. Will do it.

> your problem is that you appended a newline to the reference thereby
> stringifying it. dumper printed that string as you asked. when you use
> dumper you only pass it the reference you want and nothing else. 
[CHAN] after taken out the newline. It shows an empty array as:
  $VAR1 = [];
Does it mean it's returning an empty array?
Then what isn't the Class::Inspector->methods() not working properly?
Any idea how do I get it to work?



> -----Original Message-----
> From: Shlomi Fish [mailto:shlo...@iglu.org.il]
> 
> Always add "use strict;" and "use warnings;" (and correct all reported
> problems). Not that it should matter here.
[CHAN] Thanks for the advice. Will do it.
 
> 1. I guess ->methods returns a single array reference instead of a
flattened
> list even in scalar context. So you should do:
> 
> {{{
> my $methods = Class::Inspector->methods( 'Bio::Graphics', 'full',
'public');
> 
> foreach my $method (@$methods) {
>       # Do something with $method.
> }
> }}}
[CHAN] What is the meaning for putting the code in the 3 curly brackets?
I tried this one by putting "print $_;" in the foreach loop and the
output shows:
  __END__
I guess it's the problem in the returned array. How can I get the
Class::Inspector->methods() to work?






---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and 
is intended to be received only by persons entitled to receive such 
information. If you have received this e-mail in error, please notify the 
sender immediately. Please delete it and all attachments from any servers, hard 
drives or any other media. Other use of this e-mail by you is strictly 
prohibited.


All e-mails and attachments sent and received are subject to monitoring, 
reading and archival by Monsanto, including its subsidiaries. The recipient of 
this e-mail is solely responsible for checking for the presence of "Viruses" or 
other "Malware". Monsanto, along with its subsidiaries, accepts no liability 
for any damage caused by any such code transmitted by or accompanying this 
e-mail or any attachment.
---------------------------------------------------------------------------------------------------------


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to