On Sat, 28 Nov 2009 02:41:06 -0800, Mark_Galeck wrote:

> OK, I tried SmartComments, I must not be understanding something, I
> followed the man page exactly, but it does not seem to work:
> 
> use Smart::Comments;
> 
> sub foobar {
> ### at <loc>...
> ### $_[0]
> }
> 
> foobar 1;
> 
> 
> and when I run this I get
> 
> 
> ### at <loc>...
> ### $_[0]  : undef
> 
> so both of these lines appear to not work properly.  What am not
> understanding...??  

Nothing.  You've found a bug in Smart::Comments.  I'll report it.

Smart::Comments doesn't recognize elements of the @_ array.  An expression 
of
### shift
inside a subroutine operates on @ARGV instead.  

However (and strangely), it does recognize @_ itself:
### @_
which should help you do what you want.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274

-- 
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