My previous reply was a near-trivial fix for getting your module to survive to become an ActiveState PPM, which I thought was the main problem. It is dawning on me that PPM can't support making a new release of Scalar::Util so here is the KISS way to solve that problem.
I see no reason to require two modules, one to facilitate picking between two implementations (which is trivial to code) and another to provide the needed replacement. Just write one very simple module:
package Scalar::Util::RefAddr; use vars ( @EXPORT_OK ); @EXPORT_OK= qw( refaddr ); require Exporter; *import= \&Exporter::import; eval { require Scalar::Util }; if( defined &Scalar::Util::refaddr ) { *refaddr= \&Scalar::Util::refaddr; } else { require DynaLoader; DynaLoader::bootstrap( __PACKAGE__ ); } 1;
And cut'n'paste the XS code for refaddr() from Scalar::Util into RefAddr.xs.
- tye
In reply to Re: Working Around Missing Modules (KISS2)
by tye
in thread Working Around Missing Modules
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |