Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: lazily getting around an Exporter problem

by meraxes (Friar)
on Oct 04, 2007 at 21:37 UTC ( #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


Comment on Re^2: lazily getting around an Exporter problem
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-12-29 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls