Eric Wilhelm wrote:
> Is the Scalar::Util dependency justified? 'yes' is a fine answer, I'm
> just not certain what it's compatibility is.
The patch is *removing* the dependency on Scalar::Util and *adding* dependencies
on locale and POSIX.
> Taking advantage of $_[1] being an alias to $VERSION in import() seems a
> little sneaky, and possibly fragile.
Any terms passed on the 'use' line (apart from a number which is used in
UNIVERSAL::VERSION) are passed as @_ to the module's import() sub. Since @_ is
actually aliased to the real scalars, I can use that to shove the value into the
correct scalar. One thing I neglected to point out is that this would work as
well:
use version $VERSION => qv($Revision: 1.2$);
to use CVS-style version initialization.
> Does the '$VERSION => 1.2.0' syntax work with PAUSE/etc?
Not yet; I won't introduce that until the entire toolchain is ready for it,
which is why I'm asking about M::B.
> What about
>
> use version $VERSION = 1.2.0;
>
> $_[0] = version->new($_[0]); ?
That wouldn't work with the CVS-style initializer as I described above. I don't
know how many people are still using that mode, but I need to get the parameters
as a list, not an inline assignment, in order for both methods to work.
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Blvd
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747