]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - lib/Variable/Magic.pm
This is 0.21_02
[perl/modules/Variable-Magic.git] / lib / Variable / Magic.pm
index ffc67b4c4d6d2d1ea09c6331b7c7d8b5936711e5..366c2043d6ad83b967a00770fc4d7a01bda5f8ae 100644 (file)
@@ -13,13 +13,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl.
 
 =head1 VERSION
 
-Version 0.19
+Version 0.21_02
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.19';
+ $VERSION = '0.21_02';
 }
 
 =head1 SYNOPSIS
@@ -213,6 +213,10 @@ True for perls that don't call 'len' magic when taking the C<length> of a magica
 
 The perl patchlevel this module was built with, or C<0> for non-debugging perls.
 
+=head2 C<VMG_THREADSAFE>
+
+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<gensig>
@@ -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 ];
@@ -363,6 +373,8 @@ Some uvar tests need L<Hash::Util::FieldHash> (standard since perl 5.009004).
 
 Glob tests need L<Symbol> (standard since perl 5.002).
 
+Threads tests need L<threads> and L<threads::shared>.
+
 =head1 SEE ALSO
 
 L<perlguts> and L<perlapi> for internal information about magic.