develooper Front page | perl.perl5.porters | Postings from December 2007

Re: 5.11 (or 12) and strict

Thread Previous | Thread Next
From:
demerphq
Date:
December 27, 2007 09:37
Subject:
Re: 5.11 (or 12) and strict
Message ID:
9b18b3110712270937i4713320fs2cdb626f77f38606@mail.gmail.com
On 27/12/2007, Aaron Crane <perl@aaroncrane.co.uk> wrote:
> demerphq writes:
> > Years ago i proposed a new pragma 'caution' which was basically
> > strict+warnings. I think this would be a good way to do what you want.
> > Plus it would be cool to be able to put
> >
> >   use caution;
> >
> > at the top the script.
>
> I believe this would work, and could be CPANned without any new
> support from the core:
>
>     package caution;
>
>     sub import {
>         strict->import;
>         warnings->import;
>     }
>
>     sub unimport {
>         strict->unimport;
>         warnings->unimport;
>     }
>
>     1;
>
> That said, I'm strongly in favour of C<use 5.012> enabling strictures
> automatically.

Hrmm, that is impressivly simple, I had it in my head that it was much
more complicated to do.... Anyway I took the liberty of uploading this
to CPAN as 'ex::caution' as that is the experimental pragmata name i
reserved all those years ago. Once its fully in PAUSE ill make you
co-maint. :-)

How do folks feel about me changing its name to just 'caution'? Since
its a pragmata i suppose really Rafael should decide....

yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About