}
sub B::NULL::terse {
- my ($sv, $level) = @_;
+ my ($sv, $level) = (@_, 0);
my $s = indent($level) . sprintf "%s (0x%lx)", class($sv), $$sv;
print "$s\n" unless defined wantarray;
$s;
}
sub B::SPECIAL::terse {
- my ($sv, $level) = @_;
+ my ($sv, $level) = (@_, 0);
my $s = indent($level)
. sprintf( "%s #%d %s", class($sv), $$sv, $specialsv_name[$$sv]);
print "$s\n" unless defined wantarray;
#!./perl -Tw
BEGIN {
- chdir 't';
- @INC = '../lib';
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ if ($^O eq 'MacOS') {
+ @INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '.';
+ push @INC, '../lib';
+ }
} else {
- @INC = '.';
- push @INC, '../lib';
+ unshift @INC, 't';
}
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
#!./perl -Tw
BEGIN {
- chdir 't';
- @INC = '../lib';
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
print "1..0 # skip - Bytecode/ByteLoader doesn't work on VMS\n";
exit 0;
}
- chdir 't' if -d 't';
- @INC = qw(../lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
use Config;
if (($Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
print "1..0 # skip - no COW for now\n";
exit 0;
}
- require './test.pl'; # for run_perl()
+ require 'test.pl'; # for run_perl()
}
use strict;
my $i = 1;
my $foo = sub {$i = shift if @_};
&$foo(3);
+print 'ok';
+>>>>
+ok
############################################################
$x="Cannot use"; print index $x, "Can"
>>>>
>>>>
4
############################################################
-open our $T,"a"
+open our $T,"a";
+print 'ok';
+>>>>
+ok
############################################################
print <DATA>
__DATA__
#!./perl
BEGIN {
- chdir 't';
- @INC = '../lib';
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
plan tests => 142;
#### for content with doc'd options
+our($a, $b);
my $func = sub{ $a = $b+42 }; # canonical example asub
SKIP: {
}
my %save = %combos;
- my %combos; # outputs for $mode=any($order) and any($style)
+ %combos = (); # outputs for $mode=any($order) and any($style)
# add more samples with switching modes & sticky styles
for $style (@styles) {
#now do double crosschecks: commutativity across stick / nostick
- my %combos = (%combos, %save);
+ %combos = (%combos, %save);
# test commutativity of flags, ie that AB == BA
for $mode (@modes) {
#!./perl
BEGIN {
- chdir 't' if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ if ($^O eq 'MacOS') {
+ @INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '.';
+ push @INC, '../lib';
+ }
} else {
- @INC = '.';
- push @INC, '../lib';
+ unshift @INC, 't';
}
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
#!./perl
BEGIN {
- chdir 't' if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ if ($^O eq 'MacOS') {
+ @INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '.';
+ push @INC, '../lib';
+ }
} else {
- @INC = '.';
- push @INC, '../lib';
+ unshift @INC, 't';
}
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
#!perl
BEGIN {
- chdir q(t);
- @INC = qw(../lib ../ext/B/t);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
print "1..0 # Skip -- TODO - provide golden result regexps for 5.8\n";
exit 0;
}
- require q(./test.pl);
+ require q(test.pl);
}
use OptreeCheck;
plan tests => 9;
#!perl
BEGIN {
- chdir q(t);
- @INC = qw(../lib ../ext/B/t);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
print "1..0 # Skip -- TODO - provide golden result regexps for 5.8\n";
exit 0;
}
- require q(./test.pl);
+ require q(test.pl);
}
use OptreeCheck;
plan tests => 20;
#!./perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = qw(../lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
plan tests => 15; # adjust also number of skipped tests !
#!./perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib', '.');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', 'lib', '../lib');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
#!perl
BEGIN {
- chdir 't';
- @INC = ('../lib', '../ext/B/t');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
"1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
use OptreeCheck;
#!perl
BEGIN {
- chdir 't';
- @INC = ('../lib', '../ext/B/t');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
"1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
# import checkOptree(), and %gOpts (containing test state)
#!perl
BEGIN {
- chdir 't';
- @INC = ('../lib', '../ext/B/t');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
print "1..0 # Skip -- TODO - provide golden result regexps for 5.8\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
use OptreeCheck;
use Config;
#!perl
BEGIN {
- chdir 't';
- @INC = ('../lib', '../ext/B/t');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
"1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
use OptreeCheck;
use Config;
#!./perl
BEGIN {
- chdir 't';
- @INC = ('../lib', '../ext/B/t');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
"1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
# import checkOptree(), and %gOpts (containing test state)
#!perl
BEGIN {
- chdir 't';
- @INC = ('../lib', '../ext/B/t');
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib', '../ext/B/t');
+ } else {
+ unshift @INC, 't';
+ push @INC, "../../t";
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
"1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
use OptreeCheck;
use Config;
#!./perl
BEGIN {
- chdir 't' if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ if ($^O eq 'MacOS') {
+ @INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '.';
+ push @INC, '../lib';
+ }
} else {
- @INC = '../lib';
+ unshift @INC, 't';
+ push @INC, "../../t";
}
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
exit 0;
}
- require './test.pl';
+ require 'test.pl';
}
$| = 1;
#!./perl
BEGIN {
- chdir 't' if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ if ($^O eq 'MacOS') {
+ @INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '.';
+ push @INC, '../lib';
+ }
} else {
- @INC = '../lib';
+ unshift @INC, 't';
}
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
my $op = $1;
next unless exists $ops{$op};
like( $_, $ops{$op}, "$op " );
- delete $ops{$op};
s/$ops{$op}//;
+ delete $ops{$op};
redo if $_;
}
}
$a = 1.234;
# this is awful, but it gives a PMOP
- my $boo = split('', $foo);
+ our @ary = split('', $foo);
# PVOP, LOOP
LOOP: for (1 .. 10) {
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = qw(../lib);
+ if ($ENV{PERL_CORE}){
+ chdir('t') if -d 't';
+ @INC = ('.', '../lib');
+ } else {
+ unshift @INC, 't';
+ }
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";