develooper Front page | perl.perl5.porters | Postings from February 2003

Re: Did the assertion patch/feature submission get overlooked?

Thread Previous | Thread Next
From:
Salvador Fandiño
Date:
February 18, 2003 00:36
Subject:
Re: Did the assertion patch/feature submission get overlooked?
Message ID:
3E51FE7F.9010003@yahoo.com


Rafael Garcia-Suarez wrote:

>>>Yes, that would be a good idea : something like "assertion never activated at ..."
>>
>>This would require to take another bit from PL_hints, is that ok?
>  
> Another hint ? Why ?

to know if in the current scope "use assertions" has been seen before. A 
global is not enough because when a new file is 'require'd the hints are 
set again to 0 and so assertions should be declared again.

i.e.

___file_my_script___________
#! perl

use assertions 'foo';
use MyPackage;
...


___file_MyPackage.pm______________

package MyPackage;
my_assertion("hello") # should print a warning
...


Bye,

   - Salva


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