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

smoke escaping from use strict 'vars';

Thread Next
From:
Nicholas Clark
Date:
August 23, 2001 07:23
Subject:
smoke escaping from use strict 'vars';
Message ID:
20010823152326.E82818@plum.flirble.org
bleadperl isn't passing all its tests:

./perl lib/strict.t 
1..93
ok 1
 .
 .
 .
ok 40
PROG: 

# Check compile time scope of strict vars pragma
no strict;
{
    use strict 'vars' ;
    $joe = 1 ;
}
$joe = 1 ;
EXPECTED:
Global symbol "$joe" requires explicit package name at - line 6.
Execution of - aborted due to compilation errors.
GOT:
Global symbol "$joe" requires explicit package name at - line 6.
Global symbol "$joe" requires explicit package name at - line 8.
Execution of - aborted due to compilation errors.
not ok 41
ok 42
 .
 .
 .
ok 67
PROG: 

# Check compile time scope of strict vars pragma
no strict;
{
    use strict 'vars' ;
    $joe = 1 ;
}
$joe = 1 ;
EXPECTED:
Global symbol "$joe" requires explicit package name at - line 6.
Execution of - aborted due to compilation errors.
GOT:
Global symbol "$joe" requires explicit package name at - line 6.
Global symbol "$joe" requires explicit package name at - line 8.
Execution of - aborted due to compilation errors.
not ok 68
ok 69
ok 70
ok 71
ok 72
ok 73
ok 74
PROG: 

# Check scope of pragma with eval
no strict ;
eval {
    use strict 'vars' ;
    $joe = 1 ;
};
print STDERR $@;
$joe = 1 ;
EXPECTED:
Global symbol "$joe" requires explicit package name at - line 6.
Execution of - aborted due to compilation errors.
GOT:
Global symbol "$joe" requires explicit package name at - line 6.
Global symbol "$joe" requires explicit package name at - line 9.
Execution of - aborted due to compilation errors.
not ok 75
ok 76


Sorry, I have no idea where to look to fix this one.

Nicholas Clark

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