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

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

Salvador Fandiño
February 18, 2003 00:40
Re: Did the assertion patch/feature submission get overlooked?
Message ID: wrote:

> :To be able to have two different 'import' methods as both packages are
> :'use' based.
> But the assertions::activate is not normally directly used by anyone,

It can also be used on its own. I suppose most people prefers to use

   $ script_name arg1 arg2 ...

to run its scripts than

   $ perl script_name arg1 arg2 ...

and sometimes perl scripts are embedded in other scripts and so you can 
not use the '-A' switch easily, or even the perl interpreter could be 
embedded in another app and then you would not be able to use '-A' at all.

In those cases you can add

   use assertions::activate $ENV{MYAPPASSERT};

at the beginning of the script and then use MYAPPASSERT env var to 
activate assertions from the outside

On the other hand PERL5OPT can also be used to set -A but it's global to 
all the perl scripts


   - Salva Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About