local $@;
eval { require Config };
die 'OS unsupported' if $@;
- Config->import(qw/%Config/);
+ Config->import(qw<%Config>);
}
my @DEFINES;
my $is_gcc_34 = 0;
print "Checking if this is gcc 3.4 on Windows trying to link against an import library... ";
if ($^O eq 'MSWin32' and not grep /^LD[A-Z]*=/, @ARGV) {
- my ($libperl, $gccversion) = map $_ || '', @Config{qw/libperl gccversion/};
+ my ($libperl, $gccversion) = map $_ || '', @Config{qw<libperl gccversion>};
if ($gccversion =~ /^3\.4\.[0-9]+/ and $libperl =~ s/\.lib$//) {
$is_gcc_34 = 1;
- my ($lddlflags, $ldflags) = @Config{qw/lddlflags ldflags/};
+ my ($lddlflags, $ldflags) = @Config{qw<lddlflags ldflags>};
$_ ||= '', s/-L(?:".*?"|\S+)//g for $lddlflags, $ldflags;
$libperl = "-l$libperl";
my $libdirs = join ' ',
map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
- @Config{qw/bin sitebin/};
+ @Config{qw<bin sitebin>};
$macro{LDDLFLAGS} = "$lddlflags $libdirs $libperl";
$macro{LDFLAGS} = "$ldflags $libdirs $libperl";
$macro{PERL_ARCHIVE} = '',
sub import {
my $pkg = caller;
- for (qw/Str Int/) {
+ for (qw<Str Int>) {
my $type = __PACKAGE__ . '::' . $_;
no strict 'refs';
no warnings 'redefine';
my $expect = qr/^Invalid ARRAY reference/;
local $@;
eval q[
- use Lexical::Types as => [ qw/a b c/ ];
+ use Lexical::Types as => [ qw<a b c> ];
my LTT $x;
];
like $@, $expect, 'as => array';
diag 'This will throw two warnings' if $] >= 5.008008 and $] < 5.009;
local $@;
eval q[
- use Lexical::Types as => sub { qw/a b c/ };
+ use Lexical::Types as => sub { qw<a b c> };
my LTT $x;
];
like $@, $expect, 'as => code, returning three scalars';
use strict;
use warnings;
-use Config qw/%Config/;
+use Config qw<%Config>;
use Test::More tests => 4;
sub cb3 { push @decls, $_[0]; @_ }
{
no strict 'refs';
- *{"Int3$_\::TYPEDSCALAR"} = \&Int::TYPEDSCALAR for qw/X Y Z/;
+ *{"Int3$_\::TYPEDSCALAR"} = \&Int::TYPEDSCALAR for qw<X Y Z>;
}
local $SIG{__WARN__} = sub { push @w, join '', 'warn:', @_ };
eval <<' TESTREQUIRED3';
@w = grep !/^warn:Attempt\s+to\s+free\s+unreferenced/, @w if $] <= 5.008003;
is $@, '', 'third require test didn\'t croak prematurely';
is_deeply \@w, [ ], 'third require test didn\'t warn';
- is_deeply \@decls, [ map "Int3$_", qw/X Z/ ],
+ is_deeply \@decls, [ map "Int3$_", qw<X Z> ],
'third require test propagated in the right scopes';
}
{
package Lexical::Types::Test::Str;
- use Variable::Magic qw/wizard cast/;
+ use Variable::Magic qw<wizard cast>;
our $wiz;
BEGIN {
my $want = wantarray;
my @ret;
{
- local @{$got}{qw/get set/}; delete @{$got}{qw/get set/};
+ local @{$got}{qw<get set>};
+ delete @{$got}{qw<get set>};
if ($want) {
@ret = eval { $test->() };
} elsif (defined $want) {
{
package Lexical::Types::Test::Ref;
- use Variable::Magic qw/wizard cast/;
+ use Variable::Magic qw<wizard cast>;
our $wiz;
BEGIN {
my $want = wantarray;
my @ret;
{
- local @{$got}{qw/fetch store/}; delete @{$got}{qw/fetch store/};
+ local @{$got}{qw<fetch store>};
+ delete @{$got}{qw<fetch store>};
if ($want) {
@ret = eval { $test->() };
} elsif (defined $want) {
Test::More::plan(skip_all => $msg);
}
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $force = $ENV{PERL_LEXICAL_TYPES_TEST_THREADS} ? 1 : !1;
Test::More::plan(skip_all => $msg);
}
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $force = $ENV{PERL_LEXICAL_TYPES_TEST_THREADS} ? 1 : !1;
}
use threads;
$code = threads->create(sub {
- $code = @expected = qw/IntX/;
+ $code = @expected = qw<IntX>;
eval q{use Lexical::Types as => \&cb; my IntX $x;}; die if $@;
return $code;
})->join;
- $code += @expected = qw/IntZ/;
+ $code += @expected = qw<IntZ>;
eval q{my IntY $y;}; die if $@;
eval q{use Lexical::Types as => \&cb; my IntZ $z;}; die if $@;
$code += 256 if $code < 0;