# when changing minimum version don't forget to adjust Makefile.PL as well
our $__minimum_xsa_version;
-BEGIN { $__minimum_xsa_version = '1.15' }
+BEGIN { $__minimum_xsa_version = '1.19' }
our $USE_XS;
# the unless defined is here so that we can override the value
constant->import( TRACK_UNDEFER_FAIL => (
$INC{'Test/Builder.pm'} || $INC{'Test/Builder2.pm'}
and
- $0 =~ m|^ x?t / .+ \.t $|x
+ $0 =~ m{ ^ (?: \. \/ )? x?t / .+ \.t $}x
) ? 1 : 0 );
- require B;
- # a perl 5.6 kludge
- unless (B->can('perlstring')) {
- require Data::Dumper;
- my $d = Data::Dumper->new([])->Indent(0)->Purity(0)->Pad('')->Useqq(1)->Terse(1)->Freezer('')->Toaster('');
- *B::perlstring = sub { $d->Values([shift])->Dump };
- }
+ sub perlstring ($) { q{"}. quotemeta( shift ). q{"} };
}
# Yes this method is undocumented
if ($name =~ /\0/) {
Carp::croak(sprintf
"Illegal accessor name %s - nulls should never appear in stash keys",
- B::perlstring($name),
+ __CAG_ENV__::perlstring($name),
);
}
elsif (! $ENV{CAG_ILLEGAL_ACCESSOR_NAME_OK} ) {
# idiot, there is now a ton of DBIC code out there that attempts
# to create column accessors with illegal names. In the interest
# of not cluttering the logs of unsuspecting victims (unsuspecting
- # because these accessors are unusuable anyway) we provide an
+ # because these accessors are unusable anyway) we provide an
# explicit "do not warn at all" escape, until all such code is
# fixed (this will be a loooooong time >:(
$ENV{CAG_ILLEGAL_ACCESSOR_NAME_OK} ne 'DO_NOT_WARN'
cxsa_call => 'accessors',
pp_generator => sub {
# my ($group, $fieldname) = @_;
- my $quoted_fieldname = B::perlstring($_[1]);
+ my $quoted_fieldname = __CAG_ENV__::perlstring($_[1]);
sprintf <<'EOS', ($_[0], $quoted_fieldname) x 2;
@_ > 1
cxsa_call => 'getters',
pp_generator => sub {
# my ($group, $fieldname) = @_;
- my $quoted_fieldname = B::perlstring($_[1]);
+ my $quoted_fieldname = __CAG_ENV__::perlstring($_[1]);
sprintf <<'EOS', $_[0], $quoted_fieldname;
@_ > 1
cxsa_call => 'setters',
pp_generator => sub {
# my ($group, $fieldname) = @_;
- my $quoted_fieldname = B::perlstring($_[1]);
+ my $quoted_fieldname = __CAG_ENV__::perlstring($_[1]);
sprintf <<'EOS', $_[0], $quoted_fieldname;
@_ > 1