Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-11-18 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (278 votes). Check out past polls.

    Notices?