Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Contextual::Return blocks: can they be made to return the actual result?

by wanna_code_perl (Pilgrim)
on Jul 14, 2013 at 03:00 UTC ( #1044198=note: print w/replies, xml ) Need Help??


in reply to Re: Contextual::Return blocks: can they be made to return the actual result?
in thread Contextual::Return blocks: can they be made to return the actual result?

If $foo is an object, you shouldn't be peeking at $foo->{name} anyway; write an accessor so that you can do $foo->name.

Funny you should mention that. That's precisely what I was trying to do when I first saw the "DEFAULT block did not return a suitable reference to the hash dereference at ...". I decided it wasn't worth it a short time later, but it was starting to look like I'd have to implement most of the class inside one of Contextual::Return's METHOD { ... } blocks.

You're spot on, though. If I use anything, it'll probably be Want.

  • Comment on Re^2: Contextual::Return blocks: can they be made to return the actual result?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044198]
help
Chatterbox?
[pryrt]: 5.14.2.1-32 also mismatches; but 5.24.1.1-64 matches their sha1
[pryrt]: The mismatched ones have a Jan 23 2017 Last-Modified header -- I wonder if they rezipped them and forgot to update the sha1
[stevieb]: RT ticket for the csum mismatch of various versions of Strawberry Perl

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-03-29 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (353 votes). Check out past polls.