You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jerrad Pierce <Je...@networkengines.com> on 2000/09/28 16:41:47 UTC
OT: use problem (need interpolation)
Is there anyway to fool perl into letting you do a:
use Foo ($bar, 'baz', 'quux');
??
Foo is only getting 'baz' and 'quux', the value of $bar is lost in the
ether.
I have tried many ways of trying to sneak it past but none seems to work...
Thanks
Re: OT: use problem (need interpolation)
Posted by Matthew Byng-Maddick <mb...@colondot.net>.
On Thu, 28 Sep 2000, Jerrad Pierce wrote:
> Is there anyway to fool perl into letting you do a:
> use Foo ($bar, 'baz', 'quux');
> ??
> Foo is only getting 'baz' and 'quux', the value of $bar is lost in the
> ether.
> I have tried many ways of trying to sneak it past but none seems to work...
use is syntactically equiavalent to
BEGIN
{
require Foo;
Foo->import(@argarray);
}
so $baz will need to be defined at compile time, ie. within its own BEGIN
block.
MBM
--
Matthew Byng-Maddick Home: <mb...@colondot.net> +44 20 8981 8633 (Home)
http://colondot.net/ Work: <ma...@codix.net> +44 7956 613942 (Mobile)
Genius may have its limitations, but stupidity is not thus handicapped.
-- Elbert Hubbard