Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl -e '{ glob } ()' doesn't compile in /5.00563 (see Pod::Checker) #1120

Closed
p5pRT opened this issue Feb 2, 2000 · 6 comments
Closed

perl -e '{ glob } ()' doesn't compile in /5.00563 (see Pod::Checker) #1120

p5pRT opened this issue Feb 2, 2000 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 2, 2000

Migrated from rt.perl.org#2078 (status was 'resolved')

Searchable as RT2078$

@p5pRT
Copy link
Author

p5pRT commented Feb 2, 2000

From dcd@tc.fluke.com

Created by dcd@tc.fluke.com

When attempting to install Pod​::Checker under perl 5.00563
I discovered that

dd​:dcd$ perl -e '{ glob } ()'
syntax error at /usr/local/lib/perl5/5.00563/File/Glob.pm line 1, near "package File​::Glob"
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

It appears that my makefile defines PERL_EXTERNAL_GLOB,
and I see ths special code in Perl_ck_glob that seems
to want to load File​::Glob

The following seems to work
perl -MFile​::Glob -e '{ glob } ()'

This led me to build the makefile using
  perl -MFile​::Glob Makefile.PL

Perl Info


Site configuration information for perl 5.00563:

Configured by dcd at Tue Dec 14 16:21:58 PST 1999.

Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration:
  Platform:
    osname=linux, osvers=2.3.33, archname=i686-linux
    uname='linux dd 2.3.33 #1 tue dec 14 15:38:25 pst 1999 i686 '
    config_args='-Doptimize=-g -de -Dcf_email=dcd@tc.fluke.com'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
  Compiler:
    cc='cc', optimize='-g', gccversion=2.7.2.3
    cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /shlib /lib /usr/lib
    libs=-lgdbm -ldbm -ldb -ldl -lm -lc
    libc=/lib/libc.so.5.4.44, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00563:
    /usr/local/lib/perl5/5.00563/i686-linux
    /usr/local/lib/perl5/5.00563
    /usr/local/lib/site_perl/5.00563/i686-linux
    /usr/local/lib/site_perl
    .


Environment for perl 5.00563:
    HOME=/home/dcd
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/dcd/bin:/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/usr/games:/usr/local/samba:/home/hobbes/tools/scripts:/home/hobbes/tools/linux:/usr0/hobbes/tools/scripts:/usr0/dcd/bin:/apps/general/bin:/usr/public
    PERL_BADLANG (unset)
    SHELL=/bin/bash


@p5pRT
Copy link
Author

p5pRT commented Feb 2, 2000

From [Unknown Contact. See original ticket]

same problem occurs in v5.5.640

dd​:dcd$ perl -e '{ glob } ()'
syntax error at /usr/local/lib/perl5/5.5.640/File/Glob.pm line 1, near "package File​::Glob"
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

It also doesn't occur in 5.004_03
or 5.005_57

On Wed, 2 Feb 2000, David Dyck wrote​:

Your e-mail has been received by the Perl Bug Squashing Team.

Ticket ID '[ID 20000202.014]' has been assigned. Please include this ticket ID
in the subject line of any followup messages related to this issue.

@p5pRT
Copy link
Author

p5pRT commented Feb 7, 2000

From @gsar

On Wed, 02 Feb 2000 17​:48​:02 PST, David Dyck wrote​:

same problem occurs in v5.5.640

dd​:dcd$ perl -e '{ glob } ()'
syntax error at /usr/local/lib/perl5/5.5.640/File/Glob.pm line 1, near "package File​::Gl
ob"
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

It also doesn't occur in 5.004_03
or 5.005_57

The glob() is not the issue here. C<{ use lib }> and suchlike have always
been broken in Perl, it appears.

Here's a fix.

Sarathy
gsar@​ActiveState.com

Inline Patch
-----------------------------------8<-----------------------------------
Change 5004 by gsar@auger on 2000/02/06 17:00:49

	fix parse error on C<{ use strict }> and other constructs that
	make the parser reenter while LEX_KNOWNEXT is active

Affected files ...

... //depot/perl/t/comp/use.t#7 edit
... //depot/perl/toke.c#191 edit

Differences ...

==== //depot/perl/t/comp/use.t#7 (xtext) ====
Index: perl/t/comp/use.t
--- perl/t/comp/use.t.~1~	Sun Feb  6 09:00:54 2000
+++ perl/t/comp/use.t	Sun Feb  6 09:00:54 2000
@@ -44,9 +44,7 @@
 print "ok ",$i++,"\n";
 
 
-
-use lib; # I know that this module will be there.
-
+{ use lib }	# check that subparse saves pending tokens
 
 local $lib::VERSION = 1.0;
 

==== //depot/perl/toke.c#191 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~	Sun Feb  6 09:00:54 2000
+++ perl/toke.c	Sun Feb  6 09:00:54 2000
@@ -376,6 +376,15 @@
     SAVEI32(PL_lex_state);
     SAVEVPTR(PL_lex_inpat);
     SAVEI32(PL_lex_inwhat);
+    if (PL_lex_state == LEX_KNOWNEXT) {
+	I32 toke = PL_nexttoke;
+	while (--toke >= 0) {
+	    SAVEI32(PL_nexttype[toke]);
+	    SAVEVPTR(PL_nextval[toke]);
+	}
+	SAVEI32(PL_nexttoke);
+	PL_nexttoke = 0;
+    }
     SAVECOPLINE(PL_curcop);
     SAVEPPTR(PL_bufptr);
     SAVEPPTR(PL_bufend);
End of Patch.

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2000

From @sciurius

[Quoting Gurusamy Sarathy, on February 7 2000, 08​:06, in "Re​: [ID 20000202.014"]

dd​:dcd$ perl -e '{ glob } ()'
syntax error at /usr/local/lib/perl5/5.5.640/File/Glob.pm line 1, near "package File​::Glob"

The glob() is not the issue here. C<{ use lib }> and suchlike have always
been broken in Perl, it appears.

Nevertheless, shouldn't "perldoc -f glob" mention that it uses
File​::Glob?

-- Johan

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2000

From @gsar

On Fri, 18 Feb 2000 13​:57​:55 +0100, Johan Vromans wrote​:

Nevertheless, shouldn't "perldoc -f glob" mention that it uses
File​::Glob?

Sure, patch welcome.

Sarathy
gsar@​ActiveState.com

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2000

From @sciurius

[Quoting Gurusamy Sarathy, on February 18 2000, 10​:19, in "Re​: [ID 20000202.014"]

On Fri, 18 Feb 2000 13​:57​:55 +0100, Johan Vromans wrote​:

Nevertheless, shouldn't "perldoc -f glob" mention that it uses
File​::Glob?

Sure, patch welcome.

*** perl5.5.650/pod/perlfunc.pod~ Mon Feb 7 08​:04​:17 2000
--- perl5.5.650/pod/perlfunc.pod Fri Feb 18 19​:40​:55 2000
***************
*** 1917,1922 ****
--- 1917,1926 ----
  If EXPR is omitted, C<$_> is used. The C<E<lt>*.cE<gt>> operator is
  discussed in more detail in L<perlop/"I/O Operators">.
 
+ Earlier implementations of the glob function used the Unix shell to
+ perfom the globbing, but as of Perl version 5.6 the standard module
+ C<File​::Glob> is used instead.
+
  =item gmtime EXPR
 
  Converts a time as returned by the time function to a 9-element list

-- Johan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant