develooper Front page | perl.perl5.porters | Postings from August 2009

Re: 5.10.1: regression regarding bareword in readline()

Thread Previous | Thread Next
From:
Slaven Rezic
Date:
August 11, 2009 14:23
Subject:
Re: 5.10.1: regression regarding bareword in readline()
Message ID:
87ljlqavzu.fsf@biokovo-amd64.herceg.de
Slaven Rezic <slaven@rezic.de> writes:

> The following script
>
> #!/usr/bin/perl
> use strict;
> my $file;
> open(FILE, $file);
> my $fline = readline(FILE);
> __END__
>
> compiles under 5.10.0 but not under 5.10.1-to-be:
>
> $ /usr/perl-5.10.0-3220-gf9961a0/bin/perl -c readline.pl
> Bareword "FILE" not allowed while "strict subs" in use at readline.pl line 7.
> readline.pl had compilation errors.
> Exitcode 9
>
> git bisect says that the breakage occurred in
> 109c3d50375e96ee005ac98a3d457c7da2f5cb08 in the maint-5.10 branch,
> respective in 984f9f66477bc722578262ae8520584e44e881af in the blead
> branch.
>
> This breaks at least the CPAN distribution MySQL-Backup-0.04.
>
> Ah, a shorter way to reproduce this:
> /usr/perl-5.10.0-3220-gf9961a0/bin/perl -c -e 'use strict; readline(STDIN)'
>

I found another CPAN distribution with the same problem: Tie-Simple-1.03

And there's another bareword problem, found in Games-Go-GoPair-1.001.
With the script

    use strict;
    my @players;
    sub _rankCompare { }
    @players = sort(_rankCompare @players);

one also gets a bareword error:

Bareword "_rankCompare" not allowed while "strict subs" in use at /tmp/sort1.pl line 18.

Regards,
    Slaven

-- 
Slaven Rezic - slaven <at> rezic <dot> de

    tkrevdiff - graphical display of diffs between revisions (RCS, CVS or SVN)
    http://ptktools.sourceforge.net/#tkrevdiff

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About