X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FVariable%2FMagic.pm;h=af2762db066577e372fc7b918b593c468a377490;hb=201d2874479e003bb82662085516a07aa04391e2;hp=ffc67b4c4d6d2d1ea09c6331b7c7d8b5936711e5;hpb=183aa12b28323a21ae3b94c30cb4021ba3e8d664;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index ffc67b4..af2762d 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -213,6 +213,10 @@ True for perls that don't call 'len' magic when taking the C of a magica The perl patchlevel this module was built with, or C<0> for non-debugging perls. +=head2 C + +True iff this module could have been built with thread-safety features enabled. + =head1 FUNCTIONS =cut @@ -277,7 +281,12 @@ sub wizard { push @cbs, 'dup' if MGf_DUP; push @cbs, 'local' if MGf_LOCAL; push @cbs, qw/fetch store exists delete/ if VMG_UVAR; - return _wizard(map $opts{$_}, @cbs); + my $ret = eval { _wizard(map $opts{$_}, @cbs) }; + if (my $err = $@) { + $err =~ s/\sat\s+.*?\n//; + croak $err; + } + return $ret; } =head2 C @@ -340,7 +349,8 @@ our %EXPORT_TAGS = ( 'consts' => [ qw/SIG_MIN SIG_MAX SIG_NBR MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR/, qw/VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_UNDEF_CLEAR/, qw/VMG_COMPAT_SCALAR_LENGTH_NOLEN/, - qw/VMG_PERL_PATCHLEVEL/ ] + qw/VMG_PERL_PATCHLEVEL/, + qw/VMG_THREADSAFE/ ] ); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];