in reply to require Math::XOR
Here are several solutions.
The ^ operator documented in perlop looks identical to xor_buf, so you don't need it at all.
Answering your original question, check whether this code to do a delayed use is cross-platform, but I think it should be:
Or you can just live with the fact that require by itself doesn't do an import, and you can fully qualify the function name. Or you can do it manually as follows:unless ($INC{"Math/XOR.pm"}) { require Math::XOR; Math::XOR->import(); }
Update: PodMaster is correct. I added the .pm that I was missing.require Math::XOR; *xor_buf = \&Math::XOR::xor_buf unless defined &xor_buf;
UPDATE 2: Gah. I missed :: to / as well. I swear I was thinking it as I typed it...
In Section
Seekers of Perl Wisdom