Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: lazily getting around an Exporter problem

by meraxes (Friar)
on Oct 04, 2007 at 21:37 UTC ( [id://642775]=note: print w/replies, xml ) Need Help??


in reply to Re: lazily getting around an Exporter problem
in thread lazily getting around an Exporter problem

That actually does properly return qw/Larry Curly Moe/ if called in a LIST context but it doesn't permit me to have more than one return context.

  • If I add another one, Contextual::Return::SCALAR( sub{ 3 }), I get a syntax error.
  • If I || those two conditions on the same line (thinking if the first fails, I'll get the SCALAR context), I get told that "main::funner() cannot be called in boolean context".
  • If I call funner() in a scalar context when I just have only have the LIST contextual return clause i get this out of Data::Dumper:
$VAR1 = { 'result' => bless( do{\(my $o = undef)}, 'Contextual::Return +::Value' ) };

So it seems you're closer... but it's still a breakin'.

--
meraxes

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://642775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-20 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found