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: <[EMAIL PROTECTED]>  +44 20  8981 8633  (Home)
http://colondot.net/   Work: <[EMAIL PROTECTED]> +44 7956 613942  (Mobile)
Genius may have  its limitations,  but stupidity  is not thus handicapped.
                                                         -- Elbert Hubbard

Reply via email to