meonkeys has asked for the wisdom of the Perl Monks concerning the following question:
This code should print 'Foo! at wrap.pl line 7.', but instead, outputs:#!/usr/bin/perl -w use strict; use Hook::LexWrap; sub get { return "Foo!" } wrap get, post => sub { warn $_[-1] }; get();
Anyone know why?Use of uninitialized value in warn at wrap.pl line 6. Warning: something's wrong at wrap.pl line 6.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hook::LexWrap doesn't capture return value of subroutine in post() wrapper
by Roger (Parson) on Dec 23, 2003 at 04:10 UTC |