r66333 - in /trunk/libperl-prereqscanner-perl: ./ bin/ debian/ lib/Perl/ lib/Perl/PrereqScanner/ lib/Perl/PrereqScanner/Scanner/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Dec 25 17:29:09 UTC 2010


Author: jawnsy-guest
Date: Sat Dec 25 17:28:52 2010
New Revision: 66333

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=66333
Log:
looks good, dch -r

Modified:
    trunk/libperl-prereqscanner-perl/Changes
    trunk/libperl-prereqscanner-perl/META.json
    trunk/libperl-prereqscanner-perl/META.yml
    trunk/libperl-prereqscanner-perl/Makefile.PL
    trunk/libperl-prereqscanner-perl/README
    trunk/libperl-prereqscanner-perl/bin/scan_prereqs
    trunk/libperl-prereqscanner-perl/debian/changelog
    trunk/libperl-prereqscanner-perl/debian/control
    trunk/libperl-prereqscanner-perl/dist.ini
    trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner.pm
    trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner.pm
    trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Moose.pm
    trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Perl5.pm
    trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/TestMore.pm
    trunk/libperl-prereqscanner-perl/t/autoprereq.t

Modified: trunk/libperl-prereqscanner-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/Changes?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/Changes (original)
+++ trunk/libperl-prereqscanner-perl/Changes Sat Dec 25 17:28:52 2010
@@ -1,4 +1,10 @@
 Revision history for Perl-PrereqScanner
+
+1.000     2010-12-06 17:54:20 Europe/Paris
+ - fix rt#59016 - support for moose 1.03 version declarations (apocalypse)
+
+0.101892  2010-12-03 17:15:25 Europe/Paris
+ - throw an exception if PPI fails to parse code (vyacheslav matjukhin)
 
 0.101891  2010-09-05 15:31:49 America/New_York
  - add a core scanner for Test::More's done_testing

Modified: trunk/libperl-prereqscanner-perl/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/META.json?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/META.json (original)
+++ trunk/libperl-prereqscanner-perl/META.json Sat Dec 25 17:28:52 2010
@@ -5,7 +5,7 @@
       "Ricardo Signes <rjbs at cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.102400",
+   "generated_by" : "Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.101670",
    "license" : [
       "perl_5"
    ],
@@ -40,7 +40,7 @@
          "requires" : {
             "File::Temp" : 0,
             "PPI::Document" : 0,
-            "Test::More" : 0,
+            "Test::More" : "0.96",
             "Try::Tiny" : 0
          }
       }
@@ -49,172 +49,184 @@
    "resources" : {
       "repository" : {
          "type" : "git",
-         "url" : "git://git.codesimply.com/Perl-PrereqScanner.git"
+         "url" : "git://github.com/jquelin/perl-prereqscanner.git",
+         "web" : "http://github.com/jquelin/perl-prereqscanner"
       },
-      "x_mailing_list" : "http://www.listbox.com/subscribe/?list_id=139292"
+      "x_MailingList" : "http://www.listbox.com/subscribe/?list_id=139292"
    },
-   "version" : "0.101891",
+   "version" : "1.000",
    "x_Dist_Zilla" : {
       "plugins" : [
          {
             "class" : "Dist::Zilla::Plugin::MetaResources",
             "name" : "MetaResources",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::GatherDir",
             "name" : "@RJBS/@Basic/GatherDir",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::PruneCruft",
             "name" : "@RJBS/@Basic/PruneCruft",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::ManifestSkip",
             "name" : "@RJBS/@Basic/ManifestSkip",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaYAML",
             "name" : "@RJBS/@Basic/MetaYAML",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::License",
             "name" : "@RJBS/@Basic/License",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::Readme",
             "name" : "@RJBS/@Basic/Readme",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExtraTests",
             "name" : "@RJBS/@Basic/ExtraTests",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExecDir",
             "name" : "@RJBS/@Basic/ExecDir",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::ShareDir",
             "name" : "@RJBS/@Basic/ShareDir",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::MakeMaker",
             "name" : "@RJBS/@Basic/MakeMaker",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::Manifest",
             "name" : "@RJBS/@Basic/Manifest",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::TestRelease",
             "name" : "@RJBS/@Basic/TestRelease",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::ConfirmRelease",
             "name" : "@RJBS/@Basic/ConfirmRelease",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::UploadToCPAN",
             "name" : "@RJBS/@Basic/UploadToCPAN",
-            "version" : "4.102340"
-         },
-         {
-            "class" : "Dist::Zilla::Plugin::AutoPrereq",
-            "name" : "@RJBS/AutoPrereq",
-            "version" : "4.102340"
-         },
-         {
-            "class" : "Dist::Zilla::Plugin::BumpVersionFromGit",
-            "name" : "@RJBS/BumpVersionFromGit",
-            "version" : "0.007"
+            "version" : "4.102345"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::AutoPrereqs",
+            "name" : "@RJBS/AutoPrereqs",
+            "version" : "4.102345"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Git::NextVersion",
+            "name" : "@RJBS/Git::NextVersion",
+            "version" : "1.102810"
          },
          {
             "class" : "Dist::Zilla::Plugin::PkgVersion",
             "name" : "@RJBS/PkgVersion",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaConfig",
             "name" : "@RJBS/MetaConfig",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaJSON",
             "name" : "@RJBS/MetaJSON",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::NextRelease",
             "name" : "@RJBS/NextRelease",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
             "name" : "@RJBS/PodSyntaxTests",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::Repository",
             "name" : "@RJBS/Repository",
-            "version" : "0.13"
+            "version" : "0.16"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Prereqs",
+            "config" : {
+               "Dist::Zilla::Plugin::Prereqs" : {
+                  "phase" : "test",
+                  "type" : "requires"
+               }
+            },
+            "name" : "@RJBS/TestMoreWithSubtests",
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodWeaver",
             "name" : "@RJBS/PodWeaver",
-            "version" : "3.101640"
+            "version" : "3.101641"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Check",
             "name" : "@RJBS/@Git/Check",
-            "version" : "1.102380"
+            "version" : "1.102810"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Commit",
             "name" : "@RJBS/@Git/Commit",
-            "version" : "1.102380"
+            "version" : "1.102810"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Tag",
             "name" : "@RJBS/@Git/Tag",
-            "version" : "1.102380"
+            "version" : "1.102810"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Push",
             "name" : "@RJBS/@Git/Push",
-            "version" : "1.102380"
+            "version" : "1.102810"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":InstallModules",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":TestFiles",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ExecFiles",
-            "version" : "4.102340"
+            "version" : "4.102345"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ShareFiles",
-            "version" : "4.102340"
+            "version" : "4.102345"
          }
       ],
       "zilla" : {
@@ -222,7 +234,7 @@
          "config" : {
             "is_trial" : 0
          },
-         "version" : "4.102340"
+         "version" : "4.102345"
       }
    }
 }

Modified: trunk/libperl-prereqscanner-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/META.yml?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/META.yml (original)
+++ trunk/libperl-prereqscanner-perl/META.yml Sat Dec 25 17:28:52 2010
@@ -6,12 +6,12 @@
 build_requires:
   File::Temp: 0
   PPI::Document: 0
-  Test::More: 0
+  Test::More: 0.96
   Try::Tiny: 0
 configure_requires:
   ExtUtils::MakeMaker: 6.31
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.102400'
+generated_by: 'Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.101670'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -31,141 +31,149 @@
   namespace::autoclean: 0
   perl: 5.008
 resources:
-  X_mailing_list: http://www.listbox.com/subscribe/?list_id=139292
-  repository: git://git.codesimply.com/Perl-PrereqScanner.git
-version: 0.101891
+  repository: git://github.com/jquelin/perl-prereqscanner.git
+  x_MailingList: http://www.listbox.com/subscribe/?list_id=139292
+version: 1.000
 x_Dist_Zilla:
   plugins:
     -
       class: Dist::Zilla::Plugin::MetaResources
       name: MetaResources
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::GatherDir
       name: '@RJBS/@Basic/GatherDir'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::PruneCruft
       name: '@RJBS/@Basic/PruneCruft'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::ManifestSkip
       name: '@RJBS/@Basic/ManifestSkip'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::MetaYAML
       name: '@RJBS/@Basic/MetaYAML'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::License
       name: '@RJBS/@Basic/License'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::Readme
       name: '@RJBS/@Basic/Readme'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::ExtraTests
       name: '@RJBS/@Basic/ExtraTests'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::ExecDir
       name: '@RJBS/@Basic/ExecDir'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::ShareDir
       name: '@RJBS/@Basic/ShareDir'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::MakeMaker
       name: '@RJBS/@Basic/MakeMaker'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::Manifest
       name: '@RJBS/@Basic/Manifest'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::TestRelease
       name: '@RJBS/@Basic/TestRelease'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::ConfirmRelease
       name: '@RJBS/@Basic/ConfirmRelease'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::UploadToCPAN
       name: '@RJBS/@Basic/UploadToCPAN'
-      version: 4.102340
+      version: 4.102345
     -
-      class: Dist::Zilla::Plugin::AutoPrereq
-      name: '@RJBS/AutoPrereq'
-      version: 4.102340
+      class: Dist::Zilla::Plugin::AutoPrereqs
+      name: '@RJBS/AutoPrereqs'
+      version: 4.102345
     -
-      class: Dist::Zilla::Plugin::BumpVersionFromGit
-      name: '@RJBS/BumpVersionFromGit'
-      version: 0.007
+      class: Dist::Zilla::Plugin::Git::NextVersion
+      name: '@RJBS/Git::NextVersion'
+      version: 1.102810
     -
       class: Dist::Zilla::Plugin::PkgVersion
       name: '@RJBS/PkgVersion'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::MetaConfig
       name: '@RJBS/MetaConfig'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::MetaJSON
       name: '@RJBS/MetaJSON'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::NextRelease
       name: '@RJBS/NextRelease'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::PodSyntaxTests
       name: '@RJBS/PodSyntaxTests'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::Repository
       name: '@RJBS/Repository'
-      version: 0.13
+      version: 0.16
+    -
+      class: Dist::Zilla::Plugin::Prereqs
+      config:
+        Dist::Zilla::Plugin::Prereqs:
+          phase: test
+          type: requires
+      name: '@RJBS/TestMoreWithSubtests'
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::PodWeaver
       name: '@RJBS/PodWeaver'
-      version: 3.101640
+      version: 3.101641
     -
       class: Dist::Zilla::Plugin::Git::Check
       name: '@RJBS/@Git/Check'
-      version: 1.102380
+      version: 1.102810
     -
       class: Dist::Zilla::Plugin::Git::Commit
       name: '@RJBS/@Git/Commit'
-      version: 1.102380
+      version: 1.102810
     -
       class: Dist::Zilla::Plugin::Git::Tag
       name: '@RJBS/@Git/Tag'
-      version: 1.102380
+      version: 1.102810
     -
       class: Dist::Zilla::Plugin::Git::Push
       name: '@RJBS/@Git/Push'
-      version: 1.102380
+      version: 1.102810
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':InstallModules'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':TestFiles'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ExecFiles'
-      version: 4.102340
+      version: 4.102345
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ShareFiles'
-      version: 4.102340
+      version: 4.102345
   zilla:
     class: Dist::Zilla::Dist::Builder
     config:
       is_trial: 0
-    version: 4.102340
+    version: 4.102345

Modified: trunk/libperl-prereqscanner-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/Makefile.PL?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/Makefile.PL (original)
+++ trunk/libperl-prereqscanner-perl/Makefile.PL Sat Dec 25 17:28:52 2010
@@ -14,7 +14,7 @@
   'BUILD_REQUIRES' => {
     'File::Temp' => '0',
     'PPI::Document' => '0',
-    'Test::More' => '0',
+    'Test::More' => '0.96',
     'Try::Tiny' => '0'
   },
   'CONFIGURE_REQUIRES' => {
@@ -39,7 +39,7 @@
     'Version::Requirements' => '0.100630',
     'namespace::autoclean' => '0'
   },
-  'VERSION' => '0.101891',
+  'VERSION' => '1.000',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: trunk/libperl-prereqscanner-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/README?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/README (original)
+++ trunk/libperl-prereqscanner-perl/README Sat Dec 25 17:28:52 2010
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Perl-PrereqScanner,
-version 0.101891:
+version 1.000:
 
   a tool to scan your Perl code for its prerequisites
 

Modified: trunk/libperl-prereqscanner-perl/bin/scan_prereqs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/bin/scan_prereqs?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/bin/scan_prereqs (original)
+++ trunk/libperl-prereqscanner-perl/bin/scan_prereqs Sat Dec 25 17:28:52 2010
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 package Perl::PrereqScanner::App;
 BEGIN {
-  $Perl::PrereqScanner::App::VERSION = '0.101891';
+  $Perl::PrereqScanner::App::VERSION = '1.000';
 }
 # ABSTRACT: scan your working dir for likely prereqs
 
@@ -34,21 +34,12 @@
 
 =head1 VERSION
 
-version 0.101891
+version 1.000
 
 =head1 AUTHORS
 
-=over 4
-
-=item *
-
-Jerome Quelin
-
-=item *
-
-Ricardo Signes <rjbs at cpan.org>
-
-=back
+  Jerome Quelin
+  Ricardo Signes <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/libperl-prereqscanner-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/debian/changelog?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/debian/changelog (original)
+++ trunk/libperl-prereqscanner-perl/debian/changelog Sat Dec 25 17:28:52 2010
@@ -1,3 +1,10 @@
+libperl-prereqscanner-perl (1.000-1) unstable; urgency=low
+
+  * New upstream release
+  * Add Test::More 0.96 to Build-Depends-Indep
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Sat, 25 Dec 2010 12:43:04 -0500
+
 libperl-prereqscanner-perl (0.101891-1) unstable; urgency=low
 
   [ Salvatore Bonaccorso ]

Modified: trunk/libperl-prereqscanner-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/debian/control?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/debian/control (original)
+++ trunk/libperl-prereqscanner-perl/debian/control Sat Dec 25 17:28:52 2010
@@ -10,7 +10,8 @@
  libppi-perl (>= 1.205),
  libstring-rewriteprefix-perl,
  libtry-tiny-perl,
- libversion-requirements-perl
+ libversion-requirements-perl,
+ libtest-simple-perl (>= 0.96)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: gregor herrmann <gregoa at debian.org>, Jonathan Yu <jawnsy at cpan.org>
 Standards-Version: 3.9.1

Modified: trunk/libperl-prereqscanner-perl/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/dist.ini?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/dist.ini (original)
+++ trunk/libperl-prereqscanner-perl/dist.ini Sat Dec 25 17:28:52 2010
@@ -7,6 +7,6 @@
 
 ; -- static meta-information
 [MetaResources]
-x_mailing_list = http://www.listbox.com/subscribe/?list_id=139292
+x_MailingList = http://www.listbox.com/subscribe/?list_id=139292
 
 [@RJBS]

Modified: trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner.pm?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner.pm (original)
+++ trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner.pm Sat Dec 25 17:28:52 2010
@@ -1,7 +1,10 @@
 use 5.008;
+use strict;
+use warnings;
+
 package Perl::PrereqScanner;
 BEGIN {
-  $Perl::PrereqScanner::VERSION = '0.101891';
+  $Perl::PrereqScanner::VERSION = '1.000';
 }
 use Moose;
 # ABSTRACT: a tool to scan your Perl code for its prerequisites
@@ -55,6 +58,8 @@
 sub scan_string {
   my ($self, $str) = @_;
   my $ppi = PPI::Document->new( \$str );
+  confess "PPI parse failed" unless defined $ppi;
+
   return $self->scan_ppi_document( $ppi );
 }
 
@@ -63,6 +68,8 @@
 sub scan_file {
   my ($self, $path) = @_;
   my $ppi = PPI::Document->new( $path );
+  confess "PPI failed to parse '$path'" unless defined $ppi;
+
   return $self->scan_ppi_document( $ppi );
 }
 
@@ -91,7 +98,7 @@
 
 =head1 VERSION
 
-version 0.101891
+version 1.000
 
 =head1 SYNOPSIS
 
@@ -155,6 +162,8 @@
 Given a string containing Perl source code, this method returns a
 Version::Requirements object describing the modules it requires.
 
+This method will throw an exception if PPI fails to parse the code.
+
 =head2 scan_file
 
   my $prereqs = $scanner->scan_file( $path );
@@ -162,6 +171,8 @@
 Given a file path to a Perl document, this method returns a
 Version::Requirements object describing the modules it requires.
 
+This method will throw an exception if PPI fails to parse the code.
+
 =head2 scan_ppi_document
 
   my $prereqs = $scanner->scan_ppi_document( $ppi_doc );
@@ -173,17 +184,8 @@
 
 =head1 AUTHORS
 
-=over 4
-
-=item *
-
-Jerome Quelin
-
-=item *
-
-Ricardo Signes <rjbs at cpan.org>
-
-=back
+  Jerome Quelin
+  Ricardo Signes <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner.pm?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner.pm (original)
+++ trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner.pm Sat Dec 25 17:28:52 2010
@@ -1,6 +1,9 @@
+use strict;
+use warnings;
+
 package Perl::PrereqScanner::Scanner;
 BEGIN {
-  $Perl::PrereqScanner::Scanner::VERSION = '0.101891';
+  $Perl::PrereqScanner::Scanner::VERSION = '1.000';
 }
 use Moose::Role;
 # ABSTRACT: something that scans for prereqs in a Perl document
@@ -13,9 +16,12 @@
 # -- rjbs, 2010-04-06
 sub _q_contents {
   my ($self, $token) = @_;
-  my @contents = $token->isa('PPI::Token::QuoteLike::Words')
-    ? ( $token->literal )
-    : ( $token->string  );
+  my @contents;
+  if ( $token->isa('PPI::Token::QuoteLike::Words') || $token->isa('PPI::Token::Number') ) {
+    @contents = $token->literal;
+  } else {
+    @contents = $token->string;
+  }
 
   return @contents;
 }
@@ -31,7 +37,7 @@
 
 =head1 VERSION
 
-version 0.101891
+version 1.000
 
 =head1 DESCRIPTION
 
@@ -48,17 +54,8 @@
 
 =head1 AUTHORS
 
-=over 4
-
-=item *
-
-Jerome Quelin
-
-=item *
-
-Ricardo Signes <rjbs at cpan.org>
-
-=back
+  Jerome Quelin
+  Ricardo Signes <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Moose.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Moose.pm?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Moose.pm (original)
+++ trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Moose.pm Sat Dec 25 17:28:52 2010
@@ -1,6 +1,9 @@
+use strict;
+use warnings;
+
 package Perl::PrereqScanner::Scanner::Moose;
 BEGIN {
-  $Perl::PrereqScanner::Scanner::Moose::VERSION = '0.101891';
+  $Perl::PrereqScanner::Scanner::Moose::VERSION = '1.000';
 }
 use Moose;
 with 'Perl::PrereqScanner::Scanner';
@@ -11,11 +14,7 @@
   my ($self, $ppi_doc, $req) = @_;
 
   # Moose-based roles / inheritance
-  my @bases =
-    grep { Params::Util::_CLASS($_) }
-    map  { $self->_q_contents( $_ ) }
-    grep { $_->isa('PPI::Token::Quote') || $_->isa('PPI::Token::QuoteLike') }
-
+  my @chunks =
     # This is what we get when someone does:   with('Foo');
     # The target to get at is the PPI::Token::Quote::Single.
     # -- rjbs, 2010-09-05
@@ -27,12 +26,89 @@
     #       PPI::Token::Quote::Single
     #   PPI::Token::Structure
 
-    map  { $_->children }
+    map  { [ $_->children ] }
     grep { $_->child(0)->literal =~ m{\Awith|extends\z} }
     grep { $_->child(0)->isa('PPI::Token::Word') }
     @{ $ppi_doc->find('PPI::Statement') || [] };
 
-  $req->add_minimum($_ => 0) for @bases;
+  foreach my $hunk ( @chunks ) {
+    # roles/inheritance *WITH* version declaration ( added in Moose 1.03 )
+    if ( grep { $_->isa('PPI::Structure::Constructor') || $_->isa('PPI::Structure::List') } @$hunk ) {
+      # hack for List
+      my @hunkdata = @$hunk;
+      while ( $hunkdata[0]->isa('PPI::Token::Whitespace') ) { shift @hunkdata }
+      if ( $hunkdata[1]->isa('PPI::Structure::List') ) {
+        @hunkdata = $hunkdata[1]->children;
+        while ( $hunkdata[0]->isa('PPI::Token::Whitespace') ) { shift @hunkdata }
+      }
+      if ( $hunkdata[0]->isa('PPI::Statement::Expression') ) {
+        @hunkdata = $hunkdata[0]->children;
+      }
+
+      # possibly contains a version declaration!
+      my( $pkg, $done );
+      foreach my $elem ( @hunkdata ) {
+        # Scan for the first quote-like word, which is the package name
+        if ( $elem->isa('PPI::Token::Quote') || $elem->isa('PPI::Token::QuoteLike') ) {
+          # found a new package and the previous one didn't have a version?
+          if ( defined $pkg ) {
+            $req->add_minimum( $pkg => 0 );
+          }
+          $pkg = ( $self->_q_contents( $elem ) )[0];
+          undef $done;
+          next;
+        }
+
+        # skip over the fluff and look for the version block
+        if ( $pkg and $elem->isa('PPI::Structure::Constructor') ) {
+          foreach my $subelem ( $elem->children ) {
+            # skip over the fluff and look for the real version code
+            if ( $subelem->isa('PPI::Statement') ) {
+              my $found_ver;
+              foreach my $code ( $subelem->children ) {
+                # skip over the fluff until we're sure we saw the version declaration
+                if ( $code->isa('PPI::Token::Word') and $code->literal eq '-version' ) {
+                  $found_ver++;
+                  next;
+                }
+
+                if ( $found_ver and ( $code->isa('PPI::Token::Quote') || $code->isa('PPI::Token::QuoteLike') || $code->isa('PPI::Token::Number') ) ) {
+                  $req->add_minimum( $pkg => ( $self->_q_contents( $code ) )[0] );
+                  $done++;
+                  undef $pkg;
+                  last;
+                }
+              }
+
+              # Did we fail to find the ver?
+              if ( $found_ver and ! $done ) {
+                die "Possible internal error!";
+              }
+            }
+          }
+
+          # Failed to find version-specific stuff
+          if ( ! $done ) {
+            $req->add_minimum( $pkg => 0 );
+            undef $pkg;
+            next;
+          }
+        }
+      }
+
+      # If we found a pkg but no done, this must be the "last" pkg to be declared and it has no version
+      if ( $pkg and ! $done ) {
+        $req->add_minimum( $pkg => 0 );
+      }
+    } else {
+      # no version or funky blocks in code, yay!
+      $req->add_minimum( $_ => 0 ) for
+        grep { Params::Util::_CLASS($_) }
+        map  { $self->_q_contents( $_ ) }
+        grep { $_->isa('PPI::Token::Quote') || $_->isa('PPI::Token::QuoteLike') }
+        @$hunk;
+    }
+  }
 }
 
 1;
@@ -46,7 +122,7 @@
 
 =head1 VERSION
 
-version 0.101891
+version 1.000
 
 =head1 DESCRIPTION
 
@@ -66,17 +142,8 @@
 
 =head1 AUTHORS
 
-=over 4
-
-=item *
-
-Jerome Quelin
-
-=item *
-
-Ricardo Signes <rjbs at cpan.org>
-
-=back
+  Jerome Quelin
+  Ricardo Signes <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Perl5.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Perl5.pm?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Perl5.pm (original)
+++ trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/Perl5.pm Sat Dec 25 17:28:52 2010
@@ -1,6 +1,9 @@
+use strict;
+use warnings;
+
 package Perl::PrereqScanner::Scanner::Perl5;
 BEGIN {
-  $Perl::PrereqScanner::Scanner::Perl5::VERSION = '0.101891';
+  $Perl::PrereqScanner::Scanner::Perl5::VERSION = '1.000';
 }
 use Moose;
 with 'Perl::PrereqScanner::Scanner';
@@ -56,7 +59,7 @@
 
 =head1 VERSION
 
-version 0.101891
+version 1.000
 
 =head1 DESCRIPTION
 
@@ -76,17 +79,8 @@
 
 =head1 AUTHORS
 
-=over 4
-
-=item *
-
-Jerome Quelin
-
-=item *
-
-Ricardo Signes <rjbs at cpan.org>
-
-=back
+  Jerome Quelin
+  Ricardo Signes <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/TestMore.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/TestMore.pm?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/TestMore.pm (original)
+++ trunk/libperl-prereqscanner-perl/lib/Perl/PrereqScanner/Scanner/TestMore.pm Sat Dec 25 17:28:52 2010
@@ -1,6 +1,9 @@
+use strict;
+use warnings;
+
 package Perl::PrereqScanner::Scanner::TestMore;
 BEGIN {
-  $Perl::PrereqScanner::Scanner::TestMore::VERSION = '0.101891';
+  $Perl::PrereqScanner::Scanner::TestMore::VERSION = '1.000';
 }
 use Moose;
 use List::MoreUtils 'none';
@@ -30,21 +33,12 @@
 
 =head1 VERSION
 
-version 0.101891
+version 1.000
 
 =head1 AUTHORS
 
-=over 4
-
-=item *
-
-Jerome Quelin
-
-=item *
-
-Ricardo Signes <rjbs at cpan.org>
-
-=back
+  Jerome Quelin
+  Ricardo Signes <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/libperl-prereqscanner-perl/t/autoprereq.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-prereqscanner-perl/t/autoprereq.t?rev=66333&op=diff
==============================================================================
--- trunk/libperl-prereqscanner-perl/t/autoprereq.t (original)
+++ trunk/libperl-prereqscanner-perl/t/autoprereq.t Sat Dec 25 17:28:52 2010
@@ -72,6 +72,20 @@
 
 
 # Moose features
+prereq_is(
+  'extends "Foo::Bar";',
+  {
+    'Foo::Bar' => 0,
+  },
+);
+
+prereq_is(
+  'extends "Foo::Bar"; extends "Foo::Baz";',
+  {
+    'Foo::Bar' => 0,
+    'Foo::Baz' => 0,
+  },
+);
 prereq_is("with 'With::Single';", { 'With::Single' => 0 });
 prereq_is(
   "extends 'Extends::List1', 'Extends::List2';",
@@ -213,4 +227,282 @@
   },
 );
 
+{
+    my $scanner = Perl::PrereqScanner->new;
+    try {
+        $scanner->scan_string(\"\x0");
+        fail('scan succeeded');
+    } catch {
+        like($_, qr/PPI parse failed/);
+    };
+}
+
+# test cases for Moose 1.03 -version extension
+prereq_is(
+  'extends "Foo::Bar"=>{-version=>"1.1"};',
+  {
+    'Foo::Bar' => '1.1',
+  },
+);
+
+prereq_is(
+  'extends "Foo::Bar" => { -version => \'1.1\' };',
+  {
+    'Foo::Bar' => '1.1',
+  },
+);
+
+prereq_is(
+  'extends "Foo::Bar" => { -version => 13.3 };',
+  {
+    'Foo::Bar' => '13.3',
+  },
+);
+
+prereq_is(
+  'extends "Foo::Bar" => { -version => \'1.1\' }; extends "Foo::Baz" => { -version => 5 };',
+  {
+    'Foo::Bar' => '1.1',
+    'Foo::Baz' => 5,
+  },
+);
+
+prereq_is(
+  'extends "Foo::Bar"=>{-version=>1},"Foo::Baz"=>{-version=>2};',
+  {
+    'Foo::Bar' => 1,
+    'Foo::Baz' => 2,
+  },
+);
+
+prereq_is(
+  'extends "Foo::Bar" => { -version => "4.3.2" }, "Foo::Baz" => { -version => 2.44894 };',
+  {
+    'Foo::Bar' => '4.3.2',
+    'Foo::Baz' => 2.44894,
+  },
+);
+
+prereq_is(
+  'with "With::Single" => { -excludes => "method", -version => "1.1.1" }, "With::Double";',
+  {
+    'With::Single' => '1.1.1',
+    'With::Double' => 0,
+  },
+);
+
+prereq_is(
+  'with "With::Single" => { -wow => { -wow => { a => b } }, -version => "1.1.1" }, "With::Double";',
+  {
+    'With::Single' => '1.1.1',
+    'With::Double' => 0,
+  },
+);
+
+prereq_is(
+  'with "With::Single" => { -exclude => "method", -version => "1.1.1" },
+  "With::Double" => { -exclude => "foo" };',
+  {
+    'With::Single' => '1.1.1',
+    'With::Double' => 0,
+  },
+);
+
+prereq_is(
+  'with("Foo::Bar");',
+  {
+    'Foo::Bar' => 0,
+  },
+);
+
+prereq_is(
+  'with( "Foo::Bar" );',
+  {
+    'Foo::Bar' => 0,
+  },
+);
+
+prereq_is(
+  'with( "Foo::Bar", "Bar::Baz" );',
+  {
+    'Foo::Bar' => 0,
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'with( "Foo::Bar" => { -version => "1.1" },
+  "Bar::Baz" );',
+  {
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'with( "Blam::Blam", "Foo::Bar" => { -version => "1.1" },
+  "Bar::Baz" );',
+  {
+    'Blam::Blam' => 0,
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'with("Blam::Blam","Foo::Bar"=>{-version=>"1.1"},
+  "Bar::Baz" );',
+  {
+    'Blam::Blam' => 0,
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'with("Blam::Blam","Foo::Bar"=>{-version=>"1.1"},
+  "Bar::Baz",
+  "Hoopla" => { -version => 1 } );',
+  {
+    'Blam::Blam' => 0,
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+    'Hoopla' => 1,
+  }
+);
+
+prereq_is(
+  'extends("Foo::Bar");',
+  {
+    'Foo::Bar' => 0,
+  },
+);
+
+prereq_is(
+  'extends( "Foo::Bar" );',
+  {
+    'Foo::Bar' => 0,
+  },
+);
+
+prereq_is(
+  'extends( "Foo::Bar", "Bar::Baz" );',
+  {
+    'Foo::Bar' => 0,
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'extends( "Foo::Bar" => { -version => "1.1" },
+  "Bar::Baz" );',
+  {
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'extends( "Blam::Blam", "Foo::Bar" => { -version => "1.1" },
+  "Bar::Baz" );',
+  {
+    'Blam::Blam' => 0,
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'extends("Blam::Blam","Foo::Bar"=>{-version=>"1.1"},
+  "Bar::Baz" );',
+  {
+    'Blam::Blam' => 0,
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+  }
+);
+
+prereq_is(
+  'extends("Blam::Blam","Foo::Bar"=>{-version=>"1.1"},
+  "Bar::Baz",
+  "Hoopla" => { -version => 1 } );',
+  {
+    'Blam::Blam' => 0,
+    'Foo::Bar' => '1.1',
+    'Bar::Baz' => 0,
+    'Hoopla' => 1,
+  }
+);
+
+prereq_is(
+  'with(
+	\'AAA\' => { -version => \'1\' },
+	\'BBB\' => { -version => \'2.1\' },
+	\'CCC\' => {
+		-version => \'4.012345\',
+		default_finders => [ \':InstallModules\', \':ExecFiles\' ],
+	},
+);',
+  {
+    'AAA' => 1,
+    'BBB' => '2.1',
+    'CCC' => '4.012345',
+  },
+);
+
+prereq_is(
+  'with(
+    "AAA"
+      =>
+        {
+          -version
+            =>
+              1
+        },
+  );',
+  {
+    'AAA' => 1,
+  },
+);
+
+prereq_is(
+  'with
+    "AAA"
+      =>
+        {
+          -version
+            =>
+              1
+        };',
+  {
+    'AAA' => 1,
+  },
+);
+
+prereq_is(
+  'with(
+
+"Bar"
+
+);',
+  {
+    'Bar' => 0,
+  },
+);
+
+prereq_is(
+  'with
+
+\'Bar\'
+
+;',
+  {
+    'Bar' => 0,
+  },
+);
+
+# invalid code tests
+prereq_is( 'with;', {}, );
+prereq_is( 'with foo;', {} );
+
 done_testing;




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