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

Re: 5.11 (or 12) and strict

Thread Previous | Thread Next
From:
Tels
Date:
December 27, 2007 10:31
Subject:
Re: 5.11 (or 12) and strict
Message ID:
200712271919.13910@bloodgate.com
Moin,

On Thursday 27 December 2007 18:37:41 demerphq wrote:
> 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....

I do like the cool name of:

	"use caution;"

but at this time it doesn't really gain you anything, because to be able 
to do that, you need to specify:

* a dependency on "caution" and force all your users to 
download/configure/install yet one more package
* or wait for 5.12

Plus, everyone now needs to learn what "use caution;" does (or at least 
read it's doc), and it will confuse beginners and old perl hackers 
a-like.

So, call me unsure :)

all the best,

Tels

-- 
 Signed on Thu Dec 27 19:17:31 2007 with key 0x93B84C15.
 View my photo gallery: http://bloodgate.com/photos
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Yeah. Whatever."


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