[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
strictly no indirect object syntax?
This morning I committed this bit of code:
confess "Invalid server tier '$tier'" unless defiend $file;
It's valid under use strict, and we know that our test coverage isn't
perfect...
My colleague asked "what is this "defiend" function? Is it new in Perl6?"
I suggested "maybe it removes Damians"
(http://www.perlmonks.org/index.pl?node_id=107600)
Of course, it's valid because it's indirect object syntax:
$ perl -MO=Deparse
use strict;
use Carp;
my ($tier, $file);
confess "Invalid server tier '$tier'" unless defiend $file;
__END__
use Carp;
use strict 'refs';
my($tier, $file);
confess("Invalid server tier '${tier}'") unless $file->defiend;
__DATA__
- syntax OK
Would it be viable to add a feature to the parser to outlaw invalid object
syntax? I'm not convinced that it should go on use strict as a new stricture.
Nicholas Clark
- Follow-Ups from:
-
"H.Merijn Brand" <h.m.brand@xs4all.nl>
"David Golden" <xdaveg@gmail.com>
Reini Urban <rurban@x-ray.at>
"Alexandr Ciornii" <alexchorny@gmail.com>
"Gabor Szabo" <szabgab@gmail.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]