Click here to get back home

code written under 5.10.0 to be run under 5.8.8

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
code written under 5.10.0 to be run under 5.8.8 dummy 05-10-2008
Posted by Uri Guttman on May 12, 2008, 8:49 pm
Please log in for more thread options

s> $ perl5.10.0 -e 'print $]'
s> 5.010000
s> $ perl5.8.8 -e 'print $]'
s> 5.008008
s> $ perl5.8.2 -e 'print $]'
s> 5.008002
s> $ perl5.8.0 -e 'print $]'
s> 5.008
s> $ perl5.6.1 -e 'print $]'
s> 5.006001

s> Little question: Since this is a floating point number, are there any
s> rounding-error considerations when making comparisons and such?

those are all well within the float range but i bet they really are
strings. you can check this with some stuff in scalar::util.

s> Also, is there a reason why 5.10's output pads zeros on the right-hand
s> end of the number?

that is obvious. there is room for a subrelease number (as in all the
5.8 versions). 5.10.2 will likely have $] as 5.010002

uri

--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------

Posted by szr on May 12, 2008, 9:36 pm
Please log in for more thread options
Uri Guttman wrote:
>
> s> $ perl5.10.0 -e 'print $]'
> s> 5.010000
> s> $ perl5.8.8 -e 'print $]'
> s> 5.008008
> s> $ perl5.8.2 -e 'print $]'
> s> 5.008002
> s> $ perl5.8.0 -e 'print $]'
> s> 5.008
> s> $ perl5.6.1 -e 'print $]'
> s> 5.006001
>
> s> Little question: Since this is a floating point number, are there
> any s> rounding-error considerations when making comparisons and
> such?
>
> those are all well within the float range but i bet they really are
> strings. you can check this with some stuff in scalar::util.

I'll do that.

> s> Also, is there a reason why 5.10's output pads zeros on the
> right-hand s> end of the number?
>
> that is obvious. there is room for a subrelease number (as in all the
> 5.8 versions). 5.10.2 will likely have $] as 5.010002

Well, look at the output I posted; the one for 5.8.0 was 5.0008 (no
right-hand padding) while 5.10.0 is padded. I wanted to know why there
is a discrepancy?

--
szr



Posted by dummy on May 13, 2008, 5:13 am
Please log in for more thread options

> _
>dummy@phony.info (dummy@phony.info) wrote on VCCCLXVII September MCMXCIII
><> I understand that one can specify that a script must be run under a perl
><> version no earlier than a particular version. So, if I say 'use 5.6.0',
><> that code will throw an error if one tries to run it under perl 5.5.0,
><> right?
><>
><> But how about the reverse case?
>
>The reverse case is pretty easy:
>
> BEGIN {
> die "Your Perl version is too new" if $] > 5.008008;
> }

Not what I meant. That would prevent me from doing the development on
the desktop, using 5.10.0, defeating my intent.

BTW, beginning with 5.10.0 one can say "no someversion", which might
someday be of some use, but not now. It throws an error in 5.10.0,
since 5.10.0 is too new, and it throws an error in every other version
too, since it's not recognized. One could say "no 5.10.2", and that
would throw an error if someday 5.10.2 were installed, forcing you to
delete the "no 5.10.2". But what good could that possibly be?


>
><> Suppose I write code on my desktop, which has perl 5.10.0 installed, and
><> later transfer that code to a system that only has perl as far as 5.8.8.
><> How can I cause an error on the desktop if I accidentally use any of the
><> new features of 5.10.0, as I would want to do to signal incompatibility?
>
>That's not the reverse case.

You are right, sorry.

>
><> Is this sort of thing impossible?
>
>
>Basically, yes. There are some new features that aren't available unless
>turned on explicitely, but that isn't the case for features that will not
>cause any backwards compatability issues. For instance, there are a ton of
>new features when using regexpes, and you get them regardless whether you
>use "use feature" or not. Furthermore, bug fixes will be there as well, and
>so will any modules that are in 5.010, but not in an older install of Perl.
>
>The best way to avoid accidentily using features that aren't available on
>older Perl is to install the oldest Perl you want to develop for, and test
>with that.

I was afraid of that. I sure don't want to go back to Active State, and
strawberry is not available with older versions.



Posted by Abigail on May 13, 2008, 6:26 am
Please log in for more thread options
_
dummy@phony.info (dummy@phony.info) wrote on VCCCLXIX September MCMXCIII
__
__ I was afraid of that. I sure don't want to go back to Active State, and
__ strawberry is not available with older versions.


Then you may have to compile it yourself.


Abigail
--
perl -wle'print"Κυστ αξοτθες Πεςμ Θαγλες"^"\x80"x24'

Similar ThreadsPosted
rsh daemon written in perl? December 12, 2004, 11:14 pm
new commands written in perl September 21, 2004, 11:57 am
Can services be written in Perl? December 14, 2005, 9:31 pm
Can device drivers be written in Perl? December 9, 2005, 9:55 pm
General way to run an exe with errors written to a file September 19, 2007, 8:04 pm
is there a minimal LDAP server written in Perl? April 13, 2005, 4:12 pm
How to port scripts written for UNIX on windows June 1, 2005, 5:59 am
Can (nearly) any Perl program be written on a single line? October 19, 2005, 5:30 pm
ID3 Tags written by Perl can not be modified by any other ID3 editor December 19, 2005, 7:33 am
A simple photosharing application written in perl April 21, 2007, 3:45 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap