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

Re: 5.11 (or 12) and strict

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
December 27, 2007 08:33
Subject:
Re: 5.11 (or 12) and strict
Message ID:
4773D3AD.1030208@pobox.com
Aaron Crane 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's really neat, I didn't know you could do that!


-- 
<Schwern> What we learned was if you get confused, grab someone and swing
          them around a few times
        -- Life's lessons from square dancing

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