Perl 5.6 and Perl 5.8

A

Alvise Valsecchi

Hi, I am new to this newsgroup, hence you might have discussed this
topic in the past. Sorry for this.

Here stands my problem: I wrote a network daemon that has been working
fine under Perl 5.6 and Red Hat 7.3 for many months.

Then I installed Red Hat 8, and Perl 5.8 that comes togheter, and the
script started failing continuously.

I investigated and discovered that Perl 5.8 introduces Unicode as a
default, but there should be more than this.

I solved the problem continuing running RedHat 7.3 and Perl 5.6, but I
don't want to surrender because soon or later I should install some more
recent RedHat release.

These are my questions: is Perl 5.8 backward compatible ? If not, how
can I trace *all* the differences ? Is it possible that the Perl porters
permitted RedHat to distribute a bugged Perl release ? How can I stay
up-to-date with potential Perl problems ?

TIA. Alvise.
 
N

Nicholas Dronen

AV> Hi, I am new to this newsgroup, hence you might have discussed this
AV> topic in the past. Sorry for this.

AV> Here stands my problem: I wrote a network daemon that has been working
AV> fine under Perl 5.6 and Red Hat 7.3 for many months.

AV> Then I installed Red Hat 8, and Perl 5.8 that comes togheter, and the
AV> script started failing continuously.

I don't use Red Hat, so I don't know about problems associated
with upgrading to its version 8.

Exactly how does it fail? You might have to put logging and
debugging code in your daemon to find out.

AV> I investigated and discovered that Perl 5.8 introduces Unicode as a
AV> default, but there should be more than this.

It's hard to tell whether Unicode is the source of the problem until
you say what the problem is.

[ snip ]

AV> These are my questions: is Perl 5.8 backward compatible?

Should be.

[ snip ]

Regards,

Nicholas
 
J

Joe Smith

Here stands my problem: I wrote a network daemon that has been working
fine under Perl 5.6 and Red Hat 7.3 for many months.

Then I installed Red Hat 8, and Perl 5.8 that comes togheter, and the
script started failing continuously.

There are a lot of things that fail with RedHat-8, straight out of the
box. For instance, the 'man' command. Instead of hyphens or double
hyphens, it produces en-dash and em-dash, which do not have
displayable glyphs in the default font.

I found that adding this to my .login file helps:

if ($?LANG) then
if ($LANG == en_US.UTF-8) setenv LANG en_US # RedHat-8.0 KDE font errors
endif

Perl-5.8 is sensitive to LANG being set to any UTF setting.
Try using a non-UTF setting before running your perl programs.
-Joe
 
A

Alan J. Flavell

There are a lot of things that fail with RedHat-8, straight out of the
box.

Really? I honestly don't recall having the problems that you are
describing. I'm certainly not having them now.
For instance, the 'man' command. Instead of hyphens or double
hyphens, it produces en-dash and em-dash, which do not have
displayable glyphs in the default font.

This is the font in the (gnome) terminal window, is it? What is your
"default font"? Mine seems to be Lucida Typewriter. I don't see the
problems you are describing. Maybe I had changed it from the
installation default without really thinking - I'm not sure. But
choosing other plausible monospace fonts, I still don't see the
problems you're describing.
I found that adding this to my .login file helps:

if ($?LANG) then
if ($LANG == en_US.UTF-8) setenv LANG en_US # RedHat-8.0 KDE

Well, my LANG setting is en_GB.UTF-8 - it seems to work well for me.
Perl-5.8 is sensitive to LANG being set to any UTF setting.

Indeed it is, as part of the move towards Unicode. It's true enough
that the move had a few knock-on effects, but it's the way things are
going: I think I'd recommend coming to terms with it as far as
possible, and only resorting to the backward move as a temporary
workaround while sorting things out properly:
Try using a non-UTF setting before running your perl programs.

However, see
http://groups.google.com/[email protected]

It appears that this specific Perl dependence on LANG will go away
again in 5.8.1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top