r68105 - in /branches/upstream/libpackage-stash-xs-perl/current: ./ lib/Package/Stash/ t/ t/lib/

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Fri Feb 4 12:56:39 UTC 2011


Author: ansgar
Date: Fri Feb  4 12:56:22 2011
New Revision: 68105

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=68105
Log:
[svn-upgrade] new version libpackage-stash-xs-perl (0.21)

Added:
    branches/upstream/libpackage-stash-xs-perl/current/t/author-20-leaks.t
    branches/upstream/libpackage-stash-xs-perl/current/t/author-21-leaks-debug.t
    branches/upstream/libpackage-stash-xs-perl/current/t/lib/CompileTime.pm
Removed:
    branches/upstream/libpackage-stash-xs-perl/current/t/20-leaks.t
    branches/upstream/libpackage-stash-xs-perl/current/t/21-leaks-debug.t
Modified:
    branches/upstream/libpackage-stash-xs-perl/current/Changes
    branches/upstream/libpackage-stash-xs-perl/current/LICENSE
    branches/upstream/libpackage-stash-xs-perl/current/MANIFEST
    branches/upstream/libpackage-stash-xs-perl/current/META.json
    branches/upstream/libpackage-stash-xs-perl/current/META.yml
    branches/upstream/libpackage-stash-xs-perl/current/Makefile.PL
    branches/upstream/libpackage-stash-xs-perl/current/README
    branches/upstream/libpackage-stash-xs-perl/current/XS.xs
    branches/upstream/libpackage-stash-xs-perl/current/dist.ini
    branches/upstream/libpackage-stash-xs-perl/current/lib/Package/Stash/XS.pm
    branches/upstream/libpackage-stash-xs-perl/current/t/07-edge-cases.t

Modified: branches/upstream/libpackage-stash-xs-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/Changes?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/Changes (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/Changes Fri Feb  4 12:56:22 2011
@@ -1,4 +1,20 @@
-Revision history for Package-Stash
+Revision history for Package-Stash-XS
+
+0.21  2011-01-25
+      - make the leak tests author-only, since some smokers run release tests
+      - fix some xs forward compat stuff (Dave Mitchell)
+
+0.20  2011-01-11
+      - lower perl prereq to 5.8.1 (ribasushi)
+      - make the leak tests release-only, since they keep randomly failing on
+        platforms i don't have access to. people are encouraged to submit
+        patches for these if they are affected.
+
+0.19  2011-01-05
+      - actually fix scalar initial value validity test
+
+0.18  2011-01-05
+      - more correct validity test for scalars (rafl, Roland van Ipenburg)
 
 0.17  2010-11-16
       - bah, get rid of extra junk in the tarball

Modified: branches/upstream/libpackage-stash-xs-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/LICENSE?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/LICENSE (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/LICENSE Fri Feb  4 12:56:22 2011
@@ -1,4 +1,4 @@
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2010 by Jesse Luehrs.
+This software is Copyright (c) 2011 by Jesse Luehrs.
 
 This is free software, licensed under:
 
@@ -270,7 +270,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2010 by Jesse Luehrs.
+This software is Copyright (c) 2011 by Jesse Luehrs.
 
 This is free software, licensed under:
 

Modified: branches/upstream/libpackage-stash-xs-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/MANIFEST?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/MANIFEST (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/MANIFEST Fri Feb  4 12:56:22 2011
@@ -18,8 +18,9 @@
 t/06-addsub.t
 t/07-edge-cases.t
 t/10-synopsis.t
-t/20-leaks.t
-t/21-leaks-debug.t
+t/author-20-leaks.t
+t/author-21-leaks-debug.t
+t/lib/CompileTime.pm
 t/lib/Package/Stash.pm
 t/release-eol.t
 t/release-no-tabs.t

Modified: branches/upstream/libpackage-stash-xs-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/META.json?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/META.json (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/META.json Fri Feb  4 12:56:22 2011
@@ -4,7 +4,7 @@
       "Jesse Luehrs <doy at tozt dot net>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.102344, CPAN::Meta::Converter version 2.101670",
+   "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.101670",
    "license" : [
       "perl_5"
    ],
@@ -19,19 +19,20 @@
             "ExtUtils::MakeMaker" : "6.31"
          }
       },
+      "develop" : {
+         "requires" : {
+            "Test::LeakTrace" : 0
+         }
+      },
       "runtime" : {
          "requires" : {
-            "perl" : "v5.8.3"
+            "perl" : "v5.8.1"
          }
       },
       "test" : {
-         "recommends" : {
-            "Test::LeakTrace" : 0
-         },
          "requires" : {
             "Test::Fatal" : 0,
-            "Test::More" : "0.88",
-            "Test::Requires" : 0
+            "Test::More" : "0.88"
          }
       }
    },
@@ -39,91 +40,91 @@
    "resources" : {
       "repository" : {
          "type" : "git",
-         "url" : "git://github.com/doy/package-stash.git"
+         "url" : "git://github.com/doy/package-stash-xs.git"
       }
    },
-   "version" : "0.17",
+   "version" : "0.21",
    "x_Dist_Zilla" : {
       "plugins" : [
          {
             "class" : "Dist::Zilla::Plugin::GatherDir",
             "name" : "@DOY/GatherDir",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::PruneCruft",
             "name" : "@DOY/PruneCruft",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::ManifestSkip",
             "name" : "@DOY/ManifestSkip",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaYAML",
             "name" : "@DOY/MetaYAML",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::License",
             "name" : "@DOY/License",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::Readme",
             "name" : "@DOY/Readme",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExtraTests",
             "name" : "@DOY/ExtraTests",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExecDir",
             "name" : "@DOY/ExecDir",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::ShareDir",
             "name" : "@DOY/ShareDir",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::MakeMaker",
             "name" : "@DOY/MakeMaker",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::Manifest",
             "name" : "@DOY/Manifest",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::TestRelease",
             "name" : "@DOY/TestRelease",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::ConfirmRelease",
             "name" : "@DOY/ConfirmRelease",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaConfig",
             "name" : "@DOY/MetaConfig",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaJSON",
             "name" : "@DOY/MetaJSON",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::NextRelease",
             "name" : "@DOY/NextRelease",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
@@ -133,17 +134,17 @@
          {
             "class" : "Dist::Zilla::Plugin::PkgVersion",
             "name" : "@DOY/PkgVersion",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodCoverageTests",
             "name" : "@DOY/PodCoverageTests",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
             "name" : "@DOY/PodSyntaxTests",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::NoTabsTests",
@@ -168,12 +169,12 @@
          {
             "class" : "Dist::Zilla::Plugin::Git::Check",
             "name" : "@DOY/Git::Check",
-            "version" : "1.102810"
+            "version" : "1.103520"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Tag",
             "name" : "@DOY/Git::Tag",
-            "version" : "1.102810"
+            "version" : "1.103520"
          },
          {
             "class" : "Dist::Zilla::Plugin::BumpVersionFromGit",
@@ -188,7 +189,7 @@
          {
             "class" : "Dist::Zilla::Plugin::UploadToCPAN",
             "name" : "@DOY/UploadToCPAN",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::Prereqs",
@@ -199,7 +200,7 @@
                }
             },
             "name" : "Prereqs",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::Prereqs",
@@ -210,43 +211,43 @@
                }
             },
             "name" : "TestRequires",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::Prereqs",
             "config" : {
                "Dist::Zilla::Plugin::Prereqs" : {
-                  "phase" : "test",
-                  "type" : "recommends"
+                  "phase" : "develop",
+                  "type" : "requires"
                }
             },
-            "name" : "TestRecommends",
-            "version" : "4.102344"
+            "name" : "DevelopRequires",
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::PruneFiles",
             "name" : "PruneFiles",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":InstallModules",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":TestFiles",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ExecFiles",
-            "version" : "4.102344"
+            "version" : "4.200000"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ShareFiles",
-            "version" : "4.102344"
+            "version" : "4.200000"
          }
       ],
       "zilla" : {
@@ -254,7 +255,7 @@
          "config" : {
             "is_trial" : 0
          },
-         "version" : "4.102344"
+         "version" : "4.200000"
       }
    }
 }

Modified: branches/upstream/libpackage-stash-xs-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/META.yml?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/META.yml (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/META.yml Fri Feb  4 12:56:22 2011
@@ -5,87 +5,86 @@
 build_requires:
   Test::Fatal: 0
   Test::More: 0.88
-  Test::Requires: 0
 configure_requires:
   ExtUtils::MakeMaker: 6.31
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102344, CPAN::Meta::Converter version 2.101670'
+generated_by: 'Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.101670'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: 1.4
 name: Package-Stash-XS
 requires:
-  perl: 5.8.3
+  perl: 5.8.1
 resources:
-  repository: git://github.com/doy/package-stash.git
-version: 0.17
+  repository: git://github.com/doy/package-stash-xs.git
+version: 0.21
 x_Dist_Zilla:
   plugins:
     -
       class: Dist::Zilla::Plugin::GatherDir
       name: '@DOY/GatherDir'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::PruneCruft
       name: '@DOY/PruneCruft'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::ManifestSkip
       name: '@DOY/ManifestSkip'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::MetaYAML
       name: '@DOY/MetaYAML'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::License
       name: '@DOY/License'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::Readme
       name: '@DOY/Readme'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::ExtraTests
       name: '@DOY/ExtraTests'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::ExecDir
       name: '@DOY/ExecDir'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::ShareDir
       name: '@DOY/ShareDir'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::MakeMaker
       name: '@DOY/MakeMaker'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::Manifest
       name: '@DOY/Manifest'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::TestRelease
       name: '@DOY/TestRelease'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::ConfirmRelease
       name: '@DOY/ConfirmRelease'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::MetaConfig
       name: '@DOY/MetaConfig'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::MetaJSON
       name: '@DOY/MetaJSON'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::NextRelease
       name: '@DOY/NextRelease'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::CheckChangesHasContent
       name: '@DOY/CheckChangesHasContent'
@@ -93,15 +92,15 @@
     -
       class: Dist::Zilla::Plugin::PkgVersion
       name: '@DOY/PkgVersion'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::PodCoverageTests
       name: '@DOY/PodCoverageTests'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::PodSyntaxTests
       name: '@DOY/PodSyntaxTests'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::NoTabsTests
       name: '@DOY/NoTabsTests'
@@ -121,11 +120,11 @@
     -
       class: Dist::Zilla::Plugin::Git::Check
       name: '@DOY/Git::Check'
-      version: 1.102810
+      version: 1.103520
     -
       class: Dist::Zilla::Plugin::Git::Tag
       name: '@DOY/Git::Tag'
-      version: 1.102810
+      version: 1.103520
     -
       class: Dist::Zilla::Plugin::BumpVersionFromGit
       name: '@DOY/BumpVersionFromGit'
@@ -137,7 +136,7 @@
     -
       class: Dist::Zilla::Plugin::UploadToCPAN
       name: '@DOY/UploadToCPAN'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::Prereqs
       config:
@@ -145,7 +144,7 @@
           phase: runtime
           type: requires
       name: Prereqs
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::Prereqs
       config:
@@ -153,37 +152,37 @@
           phase: test
           type: requires
       name: TestRequires
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::Prereqs
       config:
         Dist::Zilla::Plugin::Prereqs:
-          phase: test
-          type: recommends
-      name: TestRecommends
-      version: 4.102344
+          phase: develop
+          type: requires
+      name: DevelopRequires
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::PruneFiles
       name: PruneFiles
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':InstallModules'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':TestFiles'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ExecFiles'
-      version: 4.102344
+      version: 4.200000
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ShareFiles'
-      version: 4.102344
+      version: 4.200000
   zilla:
     class: Dist::Zilla::Dist::Builder
     config:
       is_trial: 0
-    version: 4.102344
+    version: 4.200000

Modified: branches/upstream/libpackage-stash-xs-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/Makefile.PL?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/Makefile.PL (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/Makefile.PL Fri Feb  4 12:56:22 2011
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-BEGIN { require 5.8.3; }
+BEGIN { require 5.8.1; }
 
 use ExtUtils::MakeMaker 6.31;
 
@@ -13,8 +13,7 @@
   'AUTHOR' => 'Jesse Luehrs <doy at tozt dot net>',
   'BUILD_REQUIRES' => {
     'Test::Fatal' => '0',
-    'Test::More' => '0.88',
-    'Test::Requires' => '0'
+    'Test::More' => '0.88'
   },
   'CONFIGURE_REQUIRES' => {
     'ExtUtils::MakeMaker' => '6.31'
@@ -24,7 +23,7 @@
   'LICENSE' => 'perl',
   'NAME' => 'Package::Stash::XS',
   'PREREQ_PM' => {},
-  'VERSION' => '0.17',
+  'VERSION' => '0.21',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: branches/upstream/libpackage-stash-xs-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/README?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/README (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/README Fri Feb  4 12:56:22 2011
@@ -1,11 +1,11 @@
 
 
 This archive contains the distribution Package-Stash-XS,
-version 0.17:
+version 0.21:
 
   faster and more correct implementation of the Package::Stash API
 
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.

Modified: branches/upstream/libpackage-stash-xs-perl/current/XS.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/XS.xs?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/XS.xs (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/XS.xs Fri Feb  4 12:56:22 2011
@@ -22,6 +22,10 @@
 
 #ifndef savesvpv
 #define savesvpv(s) savepv(SvPV_nolen(s))
+#endif
+
+#ifndef GvCV_set
+#define GvCV_set(gv, cv) (GvCV(gv) = (CV*)(cv))
 #endif
 
 /* HACK: scalar slots are always populated on perl < 5.10, so treat undef
@@ -68,7 +72,7 @@
 } while (0)
 #define GvSetCV(g,v) do {               \
     SvREFCNT_dec(GvCV(g));              \
-    if ((GvCV(g) = (CV*)(v))) {         \
+    if ((GvCV_set(g, v))) {             \
         GvIMPORTED_CV_on(g);            \
         GvASSUMECV_on(g);               \
     }                                   \
@@ -213,11 +217,11 @@
 
     switch (type) {
     case VAR_SCALAR:
-        return sv_type == SVt_NULL ||
-               sv_type == SVt_IV   ||
-               sv_type == SVt_NV   ||
-               sv_type == SVt_PV   ||
-               sv_type == SVt_RV;
+        /* XXX: something weird is going on here - apparently values can
+         * be SVt_NULL but also be SvROK (and also, SVt_NULL isn't SvOK) */
+        if (sv_type == SVt_NULL)
+            return 1;
+        return SvROK(value) ? SvOK(SvRV(value)) : SvOK(value);
     case VAR_ARRAY:
         return sv_type == SVt_PVAV;
     case VAR_HASH:

Modified: branches/upstream/libpackage-stash-xs-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/dist.ini?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/dist.ini (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/dist.ini Fri Feb  4 12:56:22 2011
@@ -5,17 +5,16 @@
 
 [@DOY]
 :version = 0.05
-dist = Package-Stash
+dist = Package-Stash-XS
 
 [Prereqs]
-perl = 5.8.3
+perl = 5.8.1
 
 [Prereqs / TestRequires]
 Test::Fatal = 0
 Test::More = 0.88
-Test::Requires = 0
 
-[Prereqs / TestRecommends]
+[Prereqs / DevelopRequires]
 Test::LeakTrace = 0
 
 ; we maintain a Makefile.PL in the repository to be able to work without dzil,

Modified: branches/upstream/libpackage-stash-xs-perl/current/lib/Package/Stash/XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/lib/Package/Stash/XS.pm?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/lib/Package/Stash/XS.pm (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/lib/Package/Stash/XS.pm Fri Feb  4 12:56:22 2011
@@ -1,6 +1,6 @@
 package Package::Stash::XS;
 BEGIN {
-  $Package::Stash::XS::VERSION = '0.17';
+  $Package::Stash::XS::VERSION = '0.21';
 }
 use strict;
 use warnings;
@@ -29,7 +29,7 @@
 
 =head1 VERSION
 
-version 0.17
+version 0.21
 
 =head1 SYNOPSIS
 
@@ -115,7 +115,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.

Modified: branches/upstream/libpackage-stash-xs-perl/current/t/07-edge-cases.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/t/07-edge-cases.t?rev=68105&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/t/07-edge-cases.t (original)
+++ branches/upstream/libpackage-stash-xs-perl/current/t/07-edge-cases.t Fri Feb  4 12:56:22 2011
@@ -3,6 +3,7 @@
 use warnings;
 use lib 't/lib';
 use Test::More;
+use Test::Fatal;
 
 use Package::Stash;
 
@@ -52,4 +53,17 @@
 is(ref($stash->get_symbol('$glob')), '', "nothing yet");
 is(ref($stash->get_or_add_symbol('$glob')), 'SCALAR', "got an empty scalar");
 
+my $Bar = Package::Stash->new('Bar');
+my $foo = 3;
+$foo =~ s/3/4/;
+my $bar = 4.5;
+$bar =~ s/4/5/;
+
+is(exception { $Bar->add_symbol('$foo', \$foo) }, undef,
+   "can add PVIV values");
+is(exception { $Bar->add_symbol('$bar', \$bar) }, undef,
+   "can add PVNV values");
+
+use_ok('CompileTime');
+
 done_testing;

Added: branches/upstream/libpackage-stash-xs-perl/current/t/author-20-leaks.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/t/author-20-leaks.t?rev=68105&op=file
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/t/author-20-leaks.t (added)
+++ branches/upstream/libpackage-stash-xs-perl/current/t/author-20-leaks.t Fri Feb  4 12:56:22 2011
@@ -1,0 +1,202 @@
+#!/usr/bin/env perl
+
+BEGIN {
+  unless ($ENV{AUTHOR_TESTING}) {
+    require Test::More;
+    Test::More::plan(skip_all => 'these tests are for testing by the author');
+  }
+}
+
+use strict;
+use warnings;
+use lib 't/lib';
+use Test::More;
+use Test::Fatal;
+use Test::LeakTrace;
+
+use Package::Stash;
+use Symbol;
+
+{
+    package Bar;
+}
+
+{
+    package Baz;
+    our $foo;
+    sub bar { }
+    use constant baz => 1;
+    our %quux = (a => 'b');
+}
+
+{
+    no_leaks_ok {
+        Package::Stash->new('Foo');
+    } "object construction doesn't leak";
+}
+
+{
+    no_leaks_ok {
+        Package::Stash->new('Bar');
+    } "object construction doesn't leak, with an existing package";
+}
+
+{
+    no_leaks_ok {
+        Package::Stash->new('Baz');
+    } "object construction doesn't leak, with an existing package with things in it";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->name;
+        $foo->namespace;
+    } "accessors don't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->add_symbol('$scalar');
+        $foo->add_symbol('@array');
+        $foo->add_symbol('%hash');
+        $foo->add_symbol('io');
+    } "add_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    { local $TODO = $Package::Stash::IMPLEMENTATION eq 'PP'
+        ? "the pure perl implementation leaks here somehow"
+        : undef;
+    no_leaks_ok {
+        $foo->add_symbol('$scalar_init' => 1);
+        $foo->add_symbol('@array_init' => []);
+        $foo->add_symbol('%hash_init' => {});
+        $foo->add_symbol('&code_init' => sub { "foo" });
+        $foo->add_symbol('io_init' => Symbol::geniosym);
+    } "add_symbol doesn't leak";
+    }
+    is(exception {
+        is(Foo->code_init, 'foo', "sub installed correctly")
+    }, undef, "code_init exists");
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->remove_symbol('$scalar_init');
+        $foo->remove_symbol('@array_init');
+        $foo->remove_symbol('%hash_init');
+        $foo->remove_symbol('&code_init');
+        $foo->remove_symbol('io_init');
+    } "remove_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    $foo->add_symbol("${_}glob") for ('$', '@', '%', '&', '');
+    no_leaks_ok {
+        $foo->remove_glob('glob');
+    } "remove_glob doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->has_symbol('io');
+        $foo->has_symbol('%hash');
+        $foo->has_symbol('@array_init');
+        $foo->has_symbol('$glob');
+        $foo->has_symbol('&something_else');
+    } "has_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->get_symbol('io');
+        $foo->get_symbol('%hash');
+        $foo->get_symbol('@array_init');
+        $foo->get_symbol('$glob');
+        $foo->get_symbol('&something_else');
+    } "get_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    ok(!$foo->has_symbol('$glob'));
+    ok(!$foo->has_symbol('@array_init'));
+    no_leaks_ok {
+        $foo->get_or_add_symbol('io');
+        $foo->get_or_add_symbol('%hash');
+        my @super = ('Exporter');
+        @{$foo->get_or_add_symbol('@ISA')} = @super;
+        $foo->get_or_add_symbol('$glob');
+    } "get_or_add_symbol doesn't leak";
+    { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP')
+        ? "undef scalars aren't visible on 5.8, or from pure perl at all"
+        : undef;
+    ok($foo->has_symbol('$glob'));
+    }
+    is(ref($foo->get_symbol('$glob')), 'SCALAR');
+    ok($foo->has_symbol('@ISA'));
+    is(ref($foo->get_symbol('@ISA')), 'ARRAY');
+    is_deeply($foo->get_symbol('@ISA'), ['Exporter']);
+    isa_ok('Foo', 'Exporter');
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    my $baz = Package::Stash->new('Baz');
+    no_leaks_ok {
+        $foo->list_all_symbols;
+        $foo->list_all_symbols('SCALAR');
+        $foo->list_all_symbols('CODE');
+        $baz->list_all_symbols('CODE');
+    } "list_all_symbols doesn't leak";
+}
+
+{
+    package Blah;
+    use constant 'baz';
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    my $blah = Package::Stash->new('Blah');
+    no_leaks_ok {
+        $foo->get_all_symbols;
+        $foo->get_all_symbols('SCALAR');
+        $foo->get_all_symbols('CODE');
+        $blah->get_all_symbols('CODE');
+    } "get_all_symbols doesn't leak";
+}
+
+# mimic CMOP::create_anon_class
+{
+    local $TODO = $] < 5.010 ? "deleting stashes is inherently leaky on 5.8"
+                             : undef;
+    my $i = 0;
+    no_leaks_ok {
+        $i++;
+        eval "package Quux$i; 1;";
+        my $quux = Package::Stash->new("Quux$i");
+        $quux->get_or_add_symbol('@ISA');
+        delete $::{'Quux' . $i . '::'};
+    } "get_symbol doesn't leak during glob expansion";
+}
+
+{
+    local $TODO = ($Package::Stash::IMPLEMENTATION eq 'PP'
+                && $Carp::VERSION ge '1.17')
+        ? "Carp is leaky on 5.12.2 apparently?"
+        : undef;
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        eval { $foo->get_or_add_symbol('&blorg') };
+    } "doesn't leak on errors";
+}
+
+done_testing;

Added: branches/upstream/libpackage-stash-xs-perl/current/t/author-21-leaks-debug.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/t/author-21-leaks-debug.t?rev=68105&op=file
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/t/author-21-leaks-debug.t (added)
+++ branches/upstream/libpackage-stash-xs-perl/current/t/author-21-leaks-debug.t Fri Feb  4 12:56:22 2011
@@ -1,0 +1,204 @@
+#!/usr/bin/env perl
+
+BEGIN {
+  unless ($ENV{AUTHOR_TESTING}) {
+    require Test::More;
+    Test::More::plan(skip_all => 'these tests are for testing by the author');
+  }
+}
+
+use strict;
+use warnings;
+use lib 't/lib';
+use Test::More;
+use Test::Fatal;
+use Test::LeakTrace;
+
+BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
+
+use Package::Stash;
+use Symbol;
+
+{
+    package Bar;
+}
+
+{
+    package Baz;
+    our $foo;
+    sub bar { }
+    use constant baz => 1;
+    our %quux = (a => 'b');
+}
+
+{
+    no_leaks_ok {
+        Package::Stash->new('Foo');
+    } "object construction doesn't leak";
+}
+
+{
+    no_leaks_ok {
+        Package::Stash->new('Bar');
+    } "object construction doesn't leak, with an existing package";
+}
+
+{
+    no_leaks_ok {
+        Package::Stash->new('Baz');
+    } "object construction doesn't leak, with an existing package with things in it";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->name;
+        $foo->namespace;
+    } "accessors don't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->add_symbol('$scalar');
+        $foo->add_symbol('@array');
+        $foo->add_symbol('%hash');
+        $foo->add_symbol('io');
+    } "add_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    { local $TODO = $Package::Stash::IMPLEMENTATION eq 'PP'
+        ? "the pure perl implementation leaks here somehow"
+        : undef;
+    no_leaks_ok {
+        $foo->add_symbol('$scalar_init' => 1);
+        $foo->add_symbol('@array_init' => []);
+        $foo->add_symbol('%hash_init' => {});
+        $foo->add_symbol('&code_init' => sub { "foo" });
+        $foo->add_symbol('io_init' => Symbol::geniosym);
+    } "add_symbol doesn't leak";
+    }
+    is(exception {
+        is(Foo->code_init, 'foo', "sub installed correctly")
+    }, undef, "code_init exists");
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->remove_symbol('$scalar_init');
+        $foo->remove_symbol('@array_init');
+        $foo->remove_symbol('%hash_init');
+        $foo->remove_symbol('&code_init');
+        $foo->remove_symbol('io_init');
+    } "remove_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    $foo->add_symbol("${_}glob") for ('$', '@', '%', '&', '');
+    no_leaks_ok {
+        $foo->remove_glob('glob');
+    } "remove_glob doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->has_symbol('io');
+        $foo->has_symbol('%hash');
+        $foo->has_symbol('@array_init');
+        $foo->has_symbol('$glob');
+        $foo->has_symbol('&something_else');
+    } "has_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        $foo->get_symbol('io');
+        $foo->get_symbol('%hash');
+        $foo->get_symbol('@array_init');
+        $foo->get_symbol('$glob');
+        $foo->get_symbol('&something_else');
+    } "get_symbol doesn't leak";
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    ok(!$foo->has_symbol('$glob'));
+    ok(!$foo->has_symbol('@array_init'));
+    no_leaks_ok {
+        $foo->get_or_add_symbol('io');
+        $foo->get_or_add_symbol('%hash');
+        my @super = ('Exporter');
+        @{$foo->get_or_add_symbol('@ISA')} = @super;
+        $foo->get_or_add_symbol('$glob');
+    } "get_or_add_symbol doesn't leak";
+    { local $TODO = ($] < 5.010 || $Package::Stash::IMPLEMENTATION eq 'PP')
+        ? "undef scalars aren't visible on 5.8, or from pure perl at all"
+        : undef;
+    ok($foo->has_symbol('$glob'));
+    }
+    is(ref($foo->get_symbol('$glob')), 'SCALAR');
+    ok($foo->has_symbol('@ISA'));
+    is(ref($foo->get_symbol('@ISA')), 'ARRAY');
+    is_deeply($foo->get_symbol('@ISA'), ['Exporter']);
+    isa_ok('Foo', 'Exporter');
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    my $baz = Package::Stash->new('Baz');
+    no_leaks_ok {
+        $foo->list_all_symbols;
+        $foo->list_all_symbols('SCALAR');
+        $foo->list_all_symbols('CODE');
+        $baz->list_all_symbols('CODE');
+    } "list_all_symbols doesn't leak";
+}
+
+{
+    package Blah;
+    use constant 'baz';
+}
+
+{
+    my $foo = Package::Stash->new('Foo');
+    my $blah = Package::Stash->new('Blah');
+    no_leaks_ok {
+        $foo->get_all_symbols;
+        $foo->get_all_symbols('SCALAR');
+        $foo->get_all_symbols('CODE');
+        $blah->get_all_symbols('CODE');
+    } "get_all_symbols doesn't leak";
+}
+
+# mimic CMOP::create_anon_class
+{
+    local $TODO = $] < 5.010 ? "deleting stashes is inherently leaky on 5.8"
+                             : undef;
+    my $i = 0;
+    no_leaks_ok {
+        $i++;
+        eval "package Quux$i; 1;";
+        my $quux = Package::Stash->new("Quux$i");
+        $quux->get_or_add_symbol('@ISA');
+        delete $::{'Quux' . $i . '::'};
+    } "get_symbol doesn't leak during glob expansion";
+}
+
+{
+    local $TODO = ($Package::Stash::IMPLEMENTATION eq 'PP'
+                && $Carp::VERSION ge '1.17')
+        ? "Carp is leaky on 5.12.2 apparently?"
+        : undef;
+    my $foo = Package::Stash->new('Foo');
+    no_leaks_ok {
+        eval { $foo->get_or_add_symbol('&blorg') };
+    } "doesn't leak on errors";
+}
+
+done_testing;

Added: branches/upstream/libpackage-stash-xs-perl/current/t/lib/CompileTime.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-xs-perl/current/t/lib/CompileTime.pm?rev=68105&op=file
==============================================================================
--- branches/upstream/libpackage-stash-xs-perl/current/t/lib/CompileTime.pm (added)
+++ branches/upstream/libpackage-stash-xs-perl/current/t/lib/CompileTime.pm Fri Feb  4 12:56:22 2011
@@ -1,0 +1,15 @@
+package CompileTime;
+use strict;
+use warnings;
+
+use Package::Stash;
+
+our $foo = 23;
+
+BEGIN {
+    my $stash = Package::Stash->new(__PACKAGE__);
+    $stash->add_symbol('$bar', $foo);
+    $stash->add_symbol('$baz', $stash->get_symbol('$foo'));
+}
+
+1;




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