Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: What operator should perl5porters use for safe dereferencing?

by phaylon (Curate)
on May 31, 2012 at 14:58 UTC ( #973541=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my $object = $other_object->get_object;
      my $result = do {
        use safederef;
        $object->possible_method;
      };
    
  2. or download this
      my $object = $other_object->get_object;
      my $result = $object ? $object->possible_method : undef;
    
  3. or download this
      my $result = $other_object?->get_object?->possible_method;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-10-23 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls