2 ms·
It's nothing like PHP, but I still find it to be a bit too much. strict and warnings? Yes. "use feature ':5.12'"? Yes. A metaobject system incompatible with
by jrockway 16y ago
It's nothing like PHP, but I still find it to be a bit too much. strict and warnings? Yes. "use feature ':5.12'"? Yes. A metaobject system incompatible with Moose? No thanks. Autoboxing all references? No thanks.
I wrote a pragma called "no nonsense" that is a little saner:
http://search.cpan.org/~jrockway/nonsense-0.01/lib/nonsense.pm http://search.cpan.org/~jrockway/nonsense-0.01/lib/nonsense....
You say "no nonsense" at the top of the lexical scope, then you get strict and warnings, the true value required at the end of the module is automatically added, and any non-method subroutines you import are made un-callable as methods. That's it.
(I personally don't use this, because it's a little too cute. I don't mind saying "use Moose; use true; use namespace::autoclean;" at the top of my classes.)