http://qs1969.pair.com?node_id=343799


in reply to require Math::XOR

use normally does a require and import; if you want to be able to call xor_buf without qualification, you need to say Math::XOR::->import() after the require.

You may still run into problems with perl parsing things differently than if it had known about the xor_buf sub at compile time. I'm guessing Math::XOR::xor_buf didn't work because of that (in which case make sure it looks like a function call to perl, e.g. &Math::XOR::xor_buf("a","b") with & and ()) or because you got the case of some part of the name wrong.

Replies are listed 'Best First'.
Re: Re: require Math::XOR
by tilly (Archbishop) on Apr 08, 2004 at 23:37 UTC
    I was going to say that calling import multiple times under warnings could trigger spurious warnings. It can, but it doesn't in this case.

    Live and learn.