Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: What operator should perl5porters use for safe dereferencing?

by tobyink (Abbot)
on May 29, 2012 at 18:41 UTC ( #973090=note: print w/replies, xml ) Need Help??


in reply to What operator should perl5porters use for safe dereferencing?

I think the question-mark ones probably seem like they'd be most intuitive. We're already familiar with "?" from the ternary operator; and if you use one of the many CPAN modules providing method signatures, the question mark is often used to indicate optional parameters.

That said, the ~> looks less ugly in real code, so overall I prefer that.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973090]
help
Chatterbox?
choroba only has used Moo from the htree
[1nickt]: Pardonm?
[choroba]: three
[choroba]: I mean I haven't used DBIx::Class nor M:S, only Moo
[1nickt]: Haha, I was learning about Linux filesystem trees trying to understand how Moo fits.
[1nickt]: I just got my feet wet with some DBIC coding this last week. I feel "meh" about it so far. It was pretty easy to add a sub to the DBIC class to filter search results ...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-11-24 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (349 votes). Check out past polls.

    Notices?