[Israel.pm] Fwd: Phantom "require 'utf8.pm' "

Levenglick Dov-RM07994 Dov at freescale.com
Thu Feb 23 06:23:17 PST 2006


I think you may have a locale issue here.

 
Best Regards,
Dov Levenglick
DSP SoC System and Applications Engineer,
Network and Computing Systems Group
Freescale Semiconductor Israel
Tel. +972-9-952-2804
The information contained in this email is classified as:
[ ] General Business Information
[ ] Freescale Internal Use Only
[ ] Freescale Confidential Propriety
[x] Personal Memorandum
 

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf Of Gabor Szabo
Sent: Thursday, February 23, 2006 4:08 PM
To: Perl in Israel
Subject: [Israel.pm] Fwd: Phantom "require 'utf8.pm' "

for some reason Jason could not post this so here it is
---------- Forwarded message ----------
From: "Jason Elbaum" <jason.elbaum at gmail.com >
To: "Perl in Israel" <perl at perl.org.il>
Date: Thu, 23 Feb 2006 15:52:17 +0200
Subject: Phantom "require 'utf8.pm' "

I'm running a perl script consisting of many packages (classes) in a
single text file. It "use"s no modules, not even any system modules.
The words "use" and "require" do not appear anywhere in the code.

 Until now, everything has run fine. Suddenly, on one execution
platform, I'm getting the following error message:

 Can't locate utf8.pl in @INC (@INC contains: .... ) at ....prl line
2680, <IN> line 1.BEGIN failed--compilation aborted, <IN> line 1.}

 (I've omitted the @INC path and the name of the script file)

 The version of perl is 5.8.0 on Solaris. (On Linux, this message does
not appear.)


 I know why it can't find the module - the system modules are not
installed correctly. That doesn't bother me, since I don't need any of
them. What I don't understand is why the heck my code is *trying* to
access utf8.pl!

 The relevant code snippet is as follows:

 sub readLine {
  my $self = shift;
  my $file = shift;
  while (defined (my $line = <$file>)) {
  print "Reading LINE: '$line'\n" if $self->{DEBUG};
  if ($line =~ /\S/) {    # **** THIS IS LINE 2680!! **** #
  chomp $line;
  print "Returning LINE: '$line'\n" if $self->{DEBUG};
  return $line;
  }
  }


 Revving up the old Perl debugger (which I hardly ever do!), I get the
following stack trace (filename omitted):

 $ = require 'utf8.pm' called from file `...' line 2680
 $ = FileReader::BEGIN() called from file
`sub-projects/perl/perl_staticS/lib/5.8.0/utf8.pm' line 0
 $ = eval {...} called from file
`sub-projects/perl/perl_staticS/lib/5.8.0/utf8.pm' line 0
 $ = FileReader::readLine(ref(FileReader), ref(GLOB)) called from file
`...' line 2451


 I'm stumped! Where in readLine() is there an eval {} ? Why should
BEGIN suddenly be called? What's triggering the "require 'utf8.pm'"?

 Suggestions would be welcome.


 Thanks,

 Jason Elbaum
 Freescale Semiconductor Israel

_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl



More information about the Perl mailing list