|
From: hristov.milen on 22 Nov 2006 13:07 Hi, I have a module, that I require in some script. How can I require another module, inside mine and make it global. For example, if I have in my Some.pm -> 'use strict' how can I make the strict global, without require it in the main script ?
From: anno4000 on 22 Nov 2006 14:35 <hristov.milen(a)gmail.com> wrote in comp.lang.perl.misc: > Hi, > I have a module, that I require in some script. > > How can I require another module, inside mine and make it global. > > For example, if I have in my Some.pm -> 'use strict' > how can I make the strict global, without require it in the main script > ? You can't. "strict" is lexically scoped and a file is a maximal lexical scope. Anno
From: Ben Morrow on 22 Nov 2006 17:48 Quoth anno4000(a)radom.zrz.tu-berlin.de: > <hristov.milen(a)gmail.com> wrote in comp.lang.perl.misc: > > Hi, > > I have a module, that I require in some script. > > > > How can I require another module, inside mine and make it global. > > > > For example, if I have in my Some.pm -> 'use strict' > > how can I make the strict global, without require it in the main script > > ? > > You can't. "strict" is lexically scoped and a file is a maximal lexical > scope. use Acme::use::strict::with::pride; (sorry; someone had to point it out, though :) ) Ben [Just in case the OP doesn't realise: this module is a joke. It is not meant for serious use.] -- Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read. benmorrow(a)tiscali.co.uk Groucho Marx
|
Pages: 1 Prev: how to execute 30 transactions at a time Next: How to find utf8.enc? |