Click here to get back home

Problems with Parse::Lex

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    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
Problems with Parse::Lex Stan Brown 05-05-2005
Posted by Stan Brown on May 5, 2005, 8:22 pm
Please log in for more thread options


I've got a fairly complex perl script that I wrote several years ago, and
have been redeploying on a regular basis since.

Today I built a new FreeBSD 4.11 machin to use this script on. The DBI
routines require a version of perl that's newer than the default one in
FreeBSD (4.x at least, can't speak for 5.x). In any case this is easily
fixed by installing the port which builds perl 5.8.

I garbed the latest Parse::Lex from CPAN, but now when I try to run the
script, I get the following errors:


Script started on Thu May 5 12:15:01 2005
$ ./la*
Unknown 'strict' tag(s) '1' at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Token.pm line 376.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Token.pm line 376.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/ALex.pm line 23.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/ALex.pm line 23.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Lex.pm line 7.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Lex.pm line 7.
Compilation failed in require at ./latest.pl line 22.
BEGIN failed--compilation aborted at ./latest.pl line 22.
$ ^D
Script done on Thu May 5 12:15:08 2005

Can anyone suggest what I need to do to fix this?

--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                                                -- Benjamin Franklin


Posted by Sisyphus on May 6, 2005, 7:08 pm
Please log in for more thread options




> Script started on Thu May 5 12:15:01 2005
> $ ./la*
> Unknown 'strict' tag(s) '1' at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2

Looks to me that's complaining about 'use strict;' . Are you sure it's perl
5.8 that's being run ?
Just to be sure, start your script with 'use 5.008;' - then re-run it and
see what happens.

Cheers,
Rob




Posted by Stan Brown on May 6, 2005, 6:51 pm
Please log in for more thread options





>> Script started on Thu May 5 12:15:01 2005
>> $ ./la*
>> Unknown 'strict' tag(s) '1' at
>/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2

>Looks to me that's complaining about 'use strict;' . Are you sure it's perl

Indeed if I remove that from Template.pm the script runs.

>5.8 that's being run ?
>Just to be sure, start your script with 'use 5.008;' - then re-run it and
>see what happens.

Well:




Script started on Thu May 5 12:15:01 2005
$ ./la*
Unknown 'strict' tag(s) '1' at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Token.pm line 376.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Token.pm line 376.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/ALex.pm line 23.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/ALex.pm line 23.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Lex.pm line 7.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/Parse/Lex.pm line 7.
Compilation failed in require at ./latest.pl line 22.
BEGIN failed--compilation aborted at ./latest.pl line 22.
$ ^D
Script done on Thu May 5 12:15:08 2005

Doesn't that mean it _is_ being execured by the version from ports?

--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                                                -- Benjamin Franklin


Posted by Sisyphus on May 7, 2005, 7:26 pm
Please log in for more thread options



>
>
>
> >> Script started on Thu May 5 12:15:01 2005
> >> $ ./la*
> >> Unknown 'strict' tag(s) '1' at
> >/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2
>
> >Looks to me that's complaining about 'use strict;' . Are you sure it's
perl
>
> Indeed if I remove that from Template.pm the script runs.
>

Not sure where to proceed from there. I've never seen that error message
before, don't know what it means, and can't find it in 'perldoc perldiag'.
All I can think of is that perl didn't get built correctly. Maybe someone
else will chip in with some words of enlightenment.

I presume that 'use strict;' in a script produces the same fatality ? ie
it's not a problem limited only to Template.pm ? And it is a *fatal* error ?
(The wording would suggest so.)

Cheers,
Rob






Posted by Stan Brown on May 7, 2005, 5:00 pm
Please log in for more thread options




>>
>>
>>
>> >> Script started on Thu May 5 12:15:01 2005
>> >> $ ./la*
>> >> Unknown 'strict' tag(s) '1' at
>> >/usr/local/lib/perl5/site_perl/5.8.6/Parse/Template.pm line 2
>>
>> >Looks to me that's complaining about 'use strict;' . Are you sure it's
>perl
>>
>> Indeed if I remove that from Template.pm the script runs.
>>

>Not sure where to proceed from there. I've never seen that error message
>before, don't know what it means, and can't find it in 'perldoc perldiag'.
>All I can think of is that perl didn't get built correctly. Maybe someone
>else will chip in with some words of enlightenment.

>I presume that 'use strict;' in a script produces the same fatality ? ie
>it's not a problem limited only to Template.pm ? And it is a *fatal* error ?
>(The wording would suggest so.)


No, that's the interesting patrt. My script has "ue strict" in it. The
problem seems to occur when it is encounterred in a module. Very puzzling.



--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                                                -- Benjamin Franklin


Similar ThreadsPosted
Problem to get Parse::Yapp and Parse:Flex working together November 2, 2005, 3:15 pm
Parse::Readelf 0.01 - parse the output of readelf September 24, 2007, 12:07 pm
I want to take over module Parse::Lex, how to do it? April 17, 2006, 10:49 pm
Parse::FixedLength. where did pars() go? September 30, 2004, 2:02 pm
How to parse with regular expression... May 5, 2005, 6:33 am
Parse::RecDescent demo_Cgrammar.pl March 14, 2006, 6:17 pm
Any modules to parse ELF files? August 7, 2007, 5:09 pm
three Parse::RecDescent related questions October 7, 2005, 1:23 pm
best module to parse / modify C-code October 7, 2005, 1:27 pm
fails to parse the soap request April 28, 2006, 7:35 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap