in reply to Re^2: What operator should perl5porters use for safe dereferencing?
in thread What operator should perl5porters use for safe dereferencing?
The thing is, I would want to use this in a scope as limited as possible. Which means I would end up with:
my $object = $other_object->get_object; my $result = do { use safederef; $object->possible_method; };
At which point I could basically write
my $object = $other_object->get_object; my $result = $object ? $object->possible_method : undef;
Which would mean we'd end up with a best-case scenario where the traditional way needs less code to provide the same. Compare this to:
my $result = $other_object?->get_object?->possible_method;
Ordinary morality is for ordinary people. -- Aleister Crowley
In Section
Past Polls