On Sep 15, 5:06 pm, [EMAIL PROTECTED] (Marcio Faustino) wrote:
> Hi,
>
> How can I make a module that automatically uses pragmas (like
> "strict", "utf8" and "warnings") into the caller of a module? For
> example, being able to do this:
>
> use Pragmas;    # "use strict", "use utf8", "use warnings"
> $var = 123;
>
> and making perl complain about $var not being declared?

I would be surprised if you can (though I don't know for sure that you
can't).  Pragmas are lexically scoped.

You could try a source filter, maybe?
http://search.cpan.org/~dconway/Filter-Simple-0.82/lib/Filter/Simple.pm

Paul Lalli


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to