Given:
In GFfP.pm:
our $VERSION = '0.1';
Later in a script:
use GFfP;
print "GFfP::VERSION: $GFfP::VERSION -- ", $GFfP::VERSION + 0, " -- ", ( $GFfP::VERSION >= 0.199999999 ), "\n";
Why do I get the output:
GFfP::VERSION: 0.1 -- 0 -- 1
I would have expected something similar to:
GFfP::VERSION: 0.1 -- 0.1 --
That's also what I would expect - and it's what I get (though I haven't actually tested with GFfp.pm). I wondered whether it was the 'our' that was doing something strange ... but it's not that. Then I wondered if it was the single quotes around 0.1 that was creating the problem ... but it doesn't seem to be that either. eg bytes.pm has:
our $VERSION = '1.01';
and there's no problem with it.
use bytes; print $bytes::VERSION, " ", $bytes::VERSION + 0, "\n";
# prints "1.01 1.01" for me on perl 5.8.
Does enabling warnings shed any light on the matter ?
As regards *my* capacity to help, it's pretty much a case of "If I can't reproduce it, then I can't fix it" :-)
And even better, what should I code to determine that $GFfP::VERSION is greater or less than '0.2', which I am about to change it to, so that the script can knowledgeably use either version of the module?
Not sure that I fully understand the situation but normally you would just use the numeric comparison operators for determining such things.
I can change next version of the module (it is mine) but can't really retrofit the current version, if the line in GFfP.pm should be changed. Have I dug a hole for my module?
If there's a line in GFfp.pm that needs changing, then it looks to me that it aint the one you've quoted :-)
Cheers, Rob
--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs