-
Notifications
You must be signed in to change notification settings - Fork 19
Changes to Block Behavior?
Please see the main page of the repo for the actual RFC. As it states there:
Anything in the Wiki should be considered "rough drafts."
Note: The proposal has been rescinded.
Use this ticket to provide feedback.
Inside of a Corinna class, or a hypothetical module
keyword (similar to Corinna, but for procedural code), we can "fix" some things about Perl.
class Some::Class {
# different core behavior here
}
module Some::Module {
# different core behavior here
}
But what should those fixes be? Having strict
and warnings
on by default seems rather uncontroversial, but what else? We should try to get some agreement here. A first pass, obviously inspired by Perl 7 discussions:
use strict;
use warnings;
use utf8;
use open qw(:std :utf8);
use autodie ':all';
use feature qw(signatures say);
no warnings qw(experimental::signatures);
no feature qw(indirect);
no multidimensional;
no bareword::filehandles;
The "signatures" is a touch odd because method signatures don't include the $self
:
method foo ($bar) {
return !!$self->baz($bar);
}
Probably not a big deal, though.
The autodie
might surprise some, but it seems like a good thing.
For a module
keyword, the signatures might be a big odd due to the prototype issue, meaning we might not be able to dual-life this for versions of Perl prior to 5.20.
Corinna—Bringing Modern OO to Perl