r42897 - in /branches/upstream/libvariable-magic-perl/current: Changes MANIFEST META.yml Magic.xs Makefile.PL README lib/Variable/Magic.pm t/01-import.t t/90-boilerplate.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Wed Aug 26 13:24:03 UTC 2009


Author: jawnsy-guest
Date: Wed Aug 26 13:23:57 2009
New Revision: 42897

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=42897
Log:
[svn-upgrade] Integrating new upstream version, libvariable-magic-perl (0.37)

Removed:
    branches/upstream/libvariable-magic-perl/current/t/90-boilerplate.t
Modified:
    branches/upstream/libvariable-magic-perl/current/Changes
    branches/upstream/libvariable-magic-perl/current/MANIFEST
    branches/upstream/libvariable-magic-perl/current/META.yml
    branches/upstream/libvariable-magic-perl/current/Magic.xs
    branches/upstream/libvariable-magic-perl/current/Makefile.PL
    branches/upstream/libvariable-magic-perl/current/README
    branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm
    branches/upstream/libvariable-magic-perl/current/t/01-import.t

Modified: branches/upstream/libvariable-magic-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/Changes?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/Changes (original)
+++ branches/upstream/libvariable-magic-perl/current/Changes Wed Aug 26 13:23:57 2009
@@ -1,4 +1,11 @@
 Revision history for Variable-Magic
+
+0.37    2009-08-25 15:25 UTC
+        + Add : The new constant VMG_FORKSAFE can be tested to know whether the
+                module will behave nicely when fork()ing. It's currently always
+                true except on Windows where you need perl 5.10.1 for it to be
+                true.
+        + Doc : Nits and clarifications.
 
 0.36    2009-07-05 16:30 UTC
         + Chg : getdata() now returns an empty list when no magic is present.

Modified: branches/upstream/libvariable-magic-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/MANIFEST?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/MANIFEST (original)
+++ branches/upstream/libvariable-magic-perl/current/MANIFEST Wed Aug 26 13:23:57 2009
@@ -37,7 +37,6 @@
 t/35-stash.t
 t/40-threads.t
 t/41-clone.t
-t/90-boilerplate.t
 t/91-pod.t
 t/92-pod-coverage.t
 t/95-portability-files.t

Modified: branches/upstream/libvariable-magic-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/META.yml?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/META.yml (original)
+++ branches/upstream/libvariable-magic-perl/current/META.yml Wed Aug 26 13:23:57 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Variable-Magic
-version:            0.36
+version:            0.37
 abstract:           Associate user-defined magic to variables from Perl.
 author:
     - Vincent Pit <perl at profvince.com>
@@ -15,6 +15,7 @@
     ExtUtils::MakeMaker:  0
     Test::More:           0
 requires:
+    base:      0
     Carp:      0
     Exporter:  0
     perl:      5.008
@@ -28,7 +29,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.52
+generated_by:       ExtUtils::MakeMaker version 6.54
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libvariable-magic-perl/current/Magic.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/Magic.xs?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/Magic.xs (original)
+++ branches/upstream/libvariable-magic-perl/current/Magic.xs Wed Aug 26 13:23:57 2009
@@ -34,6 +34,11 @@
 
 #ifndef dNOOP
 # define dNOOP
+#endif
+
+/* Safe unless stated otherwise in Makefile.PL */
+#ifndef VMG_FORKSAFE
+# define VMG_FORKSAFE 1
 #endif
 
 #ifndef VMG_MULTIPLICITY
@@ -1263,6 +1268,7 @@
                     newSVuv(VMG_COMPAT_SCALAR_LENGTH_NOLEN));
  newCONSTSUB(stash, "VMG_PERL_PATCHLEVEL", newSVuv(VMG_PERL_PATCHLEVEL));
  newCONSTSUB(stash, "VMG_THREADSAFE",      newSVuv(VMG_THREADSAFE));
+ newCONSTSUB(stash, "VMG_FORKSAFE",        newSVuv(VMG_FORKSAFE));
  newCONSTSUB(stash, "VMG_OP_INFO_NAME",    newSVuv(VMG_OP_INFO_NAME));
  newCONSTSUB(stash, "VMG_OP_INFO_OBJECT",  newSVuv(VMG_OP_INFO_OBJECT));
 }

Modified: branches/upstream/libvariable-magic-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/Makefile.PL?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/Makefile.PL (original)
+++ branches/upstream/libvariable-magic-perl/current/Makefile.PL Wed Aug 26 13:23:57 2009
@@ -45,6 +45,11 @@
  push @DEFINES, '-DVMG_MULTIPLICITY=0';
 }
 
+# Fork emulation got "fixed" in 5.10.1
+if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
+ push @DEFINES, '-DVMG_FORKSAFE=0';
+}
+
 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
 
 my $dist = 'Variable-Magic';
@@ -79,7 +84,8 @@
     PREREQ_PM        => {
         'Carp'     => 0,
         'Exporter' => 0,
-        'XSLoader' => 0
+        'XSLoader' => 0,
+        'base'     => 0,
     },
     MIN_PERL_VERSION => 5.008,
     META_MERGE       => \%META,

Modified: branches/upstream/libvariable-magic-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/README?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/README (original)
+++ branches/upstream/libvariable-magic-perl/current/README Wed Aug 26 13:23:57 2009
@@ -2,7 +2,7 @@
     Variable::Magic - Associate user-defined magic to variables from Perl.
 
 VERSION
-    Version 0.36
+    Version 0.37
 
 SYNOPSIS
         use Variable::Magic qw/wizard cast VMG_OP_INFO_NAME/;
@@ -81,13 +81,13 @@
 
     *   "get"
 
-        This magic is invoked when the variable is evaluated (does not
-        include array/hash subscripts and slices).
+        This magic is invoked when the variable is evaluated. It is never
+        called for arrays and hashes.
 
     *   "set"
 
-        This one is triggered each time the value of the variable changes
-        (includes array/hash subscripts and slices).
+        This one is triggered each time the value of the variable changes.
+        It is called for array subscripts and slices, but never for hashes.
 
     *   "len"
 
@@ -228,7 +228,7 @@
 
                 $_[2] is an alias to the current key. Nothing prevents you
                 from changing it, but be aware that there lurk dangerous
-                side effects. For example, it may righteously be readonly if
+                side effects. For example, it may rightfully be readonly if
                 the key was a bareword. You can get a copy instead by
                 passing "copy_key => 1" to "wizard", which allows you to
                 safely assign to $_[2] in order to e.g. redirect the action
@@ -406,6 +406,11 @@
     True iff this module could have been built with thread-safety features
     enabled.
 
+  "VMG_FORKSAFE"
+    True iff this module could have been built with fork-safety features
+    enabled. This will always be true except on Windows where it's false for
+    perl 5.10.0 and below .
+
   "VMG_OP_INFO_NAME"
     Value to pass with "op_info" to get the current op name in the magic
     callbacks.

Modified: branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm (original)
+++ branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm Wed Aug 26 13:23:57 2009
@@ -13,13 +13,13 @@
 
 =head1 VERSION
 
-Version 0.36
+Version 0.37
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.36';
+ $VERSION = '0.37';
 }
 
 =head1 SYNOPSIS
@@ -105,13 +105,15 @@
 
 C<get>
 
-This magic is invoked when the variable is evaluated (does not include array/hash subscripts and slices).
+This magic is invoked when the variable is evaluated.
+It is never called for arrays and hashes.
 
 =item *
 
 C<set>
 
-This one is triggered each time the value of the variable changes (includes array/hash subscripts and slices).
+This one is triggered each time the value of the variable changes.
+It is called for array subscripts and slices, but never for hashes.
 
 =item *
 
@@ -278,7 +280,7 @@
 
 C<$_[2]> is an alias to the current key.
 Nothing prevents you from changing it, but be aware that there lurk dangerous side effects.
-For example, it may righteously be readonly if the key was a bareword.
+For example, it may rightfully be readonly if the key was a bareword.
 You can get a copy instead by passing C<< copy_key => 1 >> to L</wizard>, which allows you to safely assign to C<$_[2]> in order to e.g. redirect the action to another key.
 This however has a little performance drawback because of the copy.
 
@@ -471,6 +473,11 @@
 
 True iff this module could have been built with thread-safety features enabled.
 
+=head2 C<VMG_FORKSAFE>
+
+True iff this module could have been built with fork-safety features enabled.
+This will always be true except on Windows where it's false for perl 5.10.0 and below .
+
 =head2 C<VMG_OP_INFO_NAME>
 
 Value to pass with C<op_info> to get the current op name in the magic callbacks.
@@ -552,7 +559,7 @@
                qw/SIG_MIN SIG_MAX SIG_NBR MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR/,
                qw/VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID VMG_COMPAT_ARRAY_UNDEF_CLEAR VMG_COMPAT_SCALAR_LENGTH_NOLEN/,
                qw/VMG_PERL_PATCHLEVEL/,
-               qw/VMG_THREADSAFE/,
+               qw/VMG_THREADSAFE VMG_FORKSAFE/,
                qw/VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/
              ]
 );

Modified: branches/upstream/libvariable-magic-perl/current/t/01-import.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/t/01-import.t?rev=42897&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/t/01-import.t (original)
+++ branches/upstream/libvariable-magic-perl/current/t/01-import.t Wed Aug 26 13:23:57 2009
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 21;
+use Test::More tests => 22;
 
 require Variable::Magic;
 
@@ -13,7 +13,7 @@
         VMG_COMPAT_ARRAY_PUSH_NOLEN  VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID
         VMG_COMPAT_ARRAY_UNDEF_CLEAR VMG_COMPAT_SCALAR_LENGTH_NOLEN
         VMG_PERL_PATCHLEVEL
-        VMG_THREADSAFE
+        VMG_THREADSAFE VMG_FORKSAFE
         VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/) {
  eval { Variable::Magic->import($_) };
  is($@, '', 'import ' . $_);




More information about the Pkg-perl-cvs-commits mailing list