Hello community,
here is the log from the commit of package perl-Perl-PrereqScanner for openSUSE:Factory checked in at 2011-11-02 12:15:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Perl-PrereqScanner (Old)
and /work/SRC/openSUSE:Factory/.perl-Perl-PrereqScanner.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Perl-PrereqScanner", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Perl-PrereqScanner/perl-Perl-PrereqScanner.changes 2011-09-23 12:38:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Perl-PrereqScanner.new/perl-Perl-PrereqScanner.changes 2011-11-02 12:15:05.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Nov 01 11:55:55 UTC 2011 - pascal.bleser@opensuse.org
+
+- update to 1.008:
+ * fix rt#72062 - look for "require Module; Module->VERSION(min);"
+- changes from 1.007:
+ * new option --combine for scan_prereqs script
+- changes from 1.006:
+ * add the POE scanner for POE components
+- changes from 1.005:
+ * stop stripping "always core" prereqs like strict and warnings
+ * add the Aliased scanner for aliased.pm
+
+-------------------------------------------------------------------
Old:
----
Perl-PrereqScanner-1.004.tar.gz
New:
----
Perl-PrereqScanner-1.008.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Perl-PrereqScanner.spec ++++++
--- /var/tmp/diff_new_pack.4F3tW0/_old 2011-11-02 12:15:06.000000000 +0100
+++ /var/tmp/diff_new_pack.4F3tW0/_new 2011-11-02 12:15:06.000000000 +0100
@@ -18,14 +18,14 @@
Name: perl-Perl-PrereqScanner
-Version: 1.004
+Version: 1.008
Release: 1
License: GPL+ or Artistic
%define cpan_name Perl-PrereqScanner
-Summary: a tool to scan your Perl code for its prerequisites
+Summary: Scan your Perl code for its prerequisites
Url: http://search.cpan.org/dist/Perl-PrereqScanner/
Group: Development/Libraries/Perl
-Source: http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
+Source: http://search.cpan.org/CPAN/authors/id/J/JQ/JQUELIN/Perl-PrereqScanner-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
@@ -55,30 +55,6 @@
The scanner will extract loosely your distribution prerequisites from your
files.
-The extraction may not be perfect but tries to do its best. It will
-currently find the following prereqs:
-
-* *
-
- plain lines beginning with 'use' or 'require' in your perl modules and
- scripts, including minimum perl version
-
-* *
-
- regular inheritance declared with the 'base' and 'parent' pragmata
-
-* *
-
- the Moose manpage inheritance declared with the 'extends' keyword
-
-* *
-
- the Moose manpage roles included with the 'with' keyword
-
-It will trim the following pragamata: 'strict', 'warnings', and 'lib'.
-'base' is trimmed unless a specific version is required. 'parent' is kept,
-since it's only recently become a core library.
-
%prep
%setup -q -n %{cpan_name}-%{version}
++++++ Perl-PrereqScanner-1.004.tar.gz -> Perl-PrereqScanner-1.008.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/Changes new/Perl-PrereqScanner-1.008/Changes
--- old/Perl-PrereqScanner-1.004/Changes 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/Changes 2011-11-01 10:35:51.000000000 +0100
@@ -1,5 +1,20 @@
Revision history for Perl-PrereqScanner
+1.008 2011-11-01 10:35:46 Europe/Paris
+ - fix rt#72062 - look for "require Module; Module->VERSION(min);"
+ (Christopher J. Madsen)
+
+1.007 2011-08-31 09:22:12 Europe/Paris
+ - new option --combine for scan_prereqs script (randy stauner)
+
+1.006 2011-08-20 14:03:24 Europe/Paris
+ - add the POE scanner for POE components (David Golden)
+
+1.005 2011-08-17 18:39:22 America/New_York
+ - stop stripping "always core" prereqs like strict and warnings
+
+ - add the Aliased scanner for aliased.pm (thanks, David Golden)
+
1.004 2011-05-30 21:02:52 America/New_York
- avoid calling a method on undef (i.e., cope with PPI doing surprising
things)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/Changes~ new/Perl-PrereqScanner-1.008/Changes~
--- old/Perl-PrereqScanner-1.004/Changes~ 1970-01-01 01:00:00.000000000 +0100
+++ new/Perl-PrereqScanner-1.008/Changes~ 2011-11-01 10:35:51.000000000 +0100
@@ -0,0 +1,86 @@
+Revision history for Perl-PrereqScanner
+
+{{$NEXT}}
+
+1.006 2011-08-20 14:03:24 Europe/Paris
+ - add the POE scanner for POE components (David Golden)
+
+1.005 2011-08-17 18:39:22 America/New_York
+ - stop stripping "always core" prereqs like strict and warnings
+
+ - add the Aliased scanner for aliased.pm (thanks, David Golden)
+
+1.004 2011-05-30 21:02:52 America/New_York
+ - avoid calling a method on undef (i.e., cope with PPI doing surprising
+ things)
+
+1.003 2011-05-16 15:46:02 America/New_York
+ - fix a bug that caused things like "within" and "trextends" to trigger
+ the Moose scanner
+
+1.002 2011-02-02 10:21:55 Europe/Paris
+ - fix rt#61608 - missing description in whatisentry for TestMore.pm
+
+1.001 2011-01-05 16:35:26 Europe/Paris
+ - fix bin/prereqs (randy stauner)
+
+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
+ - do not detect prereqs for invalid class names in Moose scanner
+ - added TODO tests for "with('Name')" -- note the parens
+
+0.101890 2010-07-08 18:45:57 Europe/Paris
+ - fix rt#59121 - remove lurking temp files
+
+0.101480 2010-05-28 08:41:56 America/New_York
+ - bump prereq version of String::RewritePrefix
+
+0.101250 2010-05-05 09:32:19 America/New_York
+ - convert to Moose object system
+ - add the Scanner role and pluggable scanners
+
+0.100960 2010-04-06 17:03:46 Europe/Paris
+ - add 'feature' pragma to skip list (mark gardner)
+ - added some tests (mark gardner)
+
+0.100830 2010-03-24 13:37:31 Europe/Paris
+ - fix rt#55713: support for use parent -norequire
+ - fix rt#55851: 'require $foo;' shouldn't add any prereq
+
+0.100690 2010-03-10 21:06:49 America/New_York
+ - remove another 5.10-ism
+
+0.100680 2010-03-09 19:10:27 America/New_York
+ - fix PPI version required (thanks, Christopher J. Madsen)
+
+0.100630 2010-03-04 22:58:55 America/New_York
+ - work on perl 5.8
+ - require a newer Version::Requirements with critical bugfix
+
+0.100521 2010-02-21 23:20:55 America/New_York
+ - scanning methods now return Version::Requirements objects
+
+0.100520 2010-02-21 15:55:31 America/New_York
+ - add perl prereq to Makefile.PL to stop test failures
+
+0.100510 2010-02-20 17:38:59 America/New_York
+ - typo fixes (ricardo signes)
+ - new script scan_prereqs
+ - prereq accounting now managed by Version::Requirements
+ - easier-to-link-to Pod
+
+0.100491 2010-02-18 19:16:15 Europe/Paris
+ - added a changelog (this file)
+
+0.100490 2010-02-18 19:10:32 Europe/Paris
+ - factored out from dist-zilla-plugin-autoprereq
+ - fix qw and base-ver parent-ver (ricardo signes)
+ - require base if version given (ricardo signes)
+ - refactor with/extends (ricardo signes)
+ - new methods scan_string() / scan_file()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/MANIFEST new/Perl-PrereqScanner-1.008/MANIFEST
--- old/Perl-PrereqScanner-1.004/MANIFEST 2011-05-31 03:02:59.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/MANIFEST 2011-11-01 10:35:51.000000000 +0100
@@ -1,4 +1,5 @@
Changes
+Changes~
LICENSE
MANIFEST
META.json
@@ -6,11 +7,16 @@
Makefile.PL
README
bin/scan_prereqs
+corpus/scan/bar.pl
+corpus/scan/foo.pl
dist.ini
lib/Perl/PrereqScanner.pm
lib/Perl/PrereqScanner/Scanner.pm
+lib/Perl/PrereqScanner/Scanner/Aliased.pm
lib/Perl/PrereqScanner/Scanner/Moose.pm
+lib/Perl/PrereqScanner/Scanner/POE.pm
lib/Perl/PrereqScanner/Scanner/Perl5.pm
lib/Perl/PrereqScanner/Scanner/TestMore.pm
t/autoprereq.t
t/release-pod-syntax.t
+t/scan_prereqs.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/META.json new/Perl-PrereqScanner-1.008/META.json
--- old/Perl-PrereqScanner-1.004/META.json 2011-05-31 03:02:59.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/META.json 2011-11-01 10:35:51.000000000 +0100
@@ -5,7 +5,7 @@
"Ricardo Signes "
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.200006, CPAN::Meta::Converter version 2.110930",
+ "generated_by" : "Dist::Zilla version 4.300002, CPAN::Meta::Converter version 2.110440",
"license" : [
"perl_5"
],
@@ -24,6 +24,7 @@
"requires" : {
"File::Spec::Functions" : 0,
"FindBin" : 0,
+ "Getopt::Long" : 0,
"List::MoreUtils" : 0,
"List::Util" : 0,
"Moose" : 0,
@@ -33,7 +34,9 @@
"String::RewritePrefix" : "0.005",
"Version::Requirements" : "0.100630",
"namespace::autoclean" : 0,
- "perl" : "5.008"
+ "perl" : "5.008",
+ "strict" : 0,
+ "warnings" : 0
}
},
"test" : {
@@ -47,131 +50,131 @@
},
"release_status" : "stable",
"resources" : {
- "homepage" : "http://github.com/rjbs/perl-prereqscanner",
+ "homepage" : "https://github.com/rjbs/perl-prereqscanner",
"repository" : {
"type" : "git",
- "url" : "http://github.com/rjbs/perl-prereqscanner",
- "web" : "http://github.com/rjbs/perl-prereqscanner"
+ "url" : "https://github.com/rjbs/perl-prereqscanner.git",
+ "web" : "https://github.com/rjbs/perl-prereqscanner"
},
"x_MailingList" : "http://www.listbox.com/subscribe/?list_id=139292"
},
- "version" : "1.004",
+ "version" : "1.008",
"x_Dist_Zilla" : {
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::MetaResources",
"name" : "MetaResources",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.003"
+ "version" : "0.005"
},
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@RJBS/@Basic/GatherDir",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Basic/PruneCruft",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Basic/ManifestSkip",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Basic/MetaYAML",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Basic/License",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Basic/Readme",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@RJBS/@Basic/ExtraTests",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Basic/ExecDir",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Basic/ShareDir",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Basic/MakeMaker",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Basic/Manifest",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Basic/TestRelease",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Basic/ConfirmRelease",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Basic/UploadToCPAN",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
"name" : "@RJBS/Git::NextVersion",
- "version" : "1.111460"
+ "version" : "1.112510"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::Repository",
@@ -187,7 +190,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -197,65 +200,65 @@
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@RJBS/GithubMeta",
- "version" : "0.12"
+ "version" : "0.22"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@RJBS/@Git/Check",
- "version" : "1.111460"
+ "version" : "1.112510"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"name" : "@RJBS/@Git/Commit",
- "version" : "1.111460"
+ "version" : "1.112510"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@RJBS/@Git/Tag",
- "version" : "1.111460"
+ "version" : "1.112510"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"name" : "@RJBS/@Git/Push",
- "version" : "1.111460"
+ "version" : "1.112510"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.200006"
+ "version" : "4.300002"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "4.200006"
+ "version" : "4.300002"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
- "is_trial" : 0
+ "is_trial" : "0"
},
- "version" : "4.200006"
+ "version" : "4.300002"
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/META.yml new/Perl-PrereqScanner-1.008/META.yml
--- old/Perl-PrereqScanner-1.004/META.yml 2011-05-31 03:02:59.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/META.yml 2011-11-01 10:35:51.000000000 +0100
@@ -11,7 +11,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200006, CPAN::Meta::Converter version 2.110930'
+generated_by: 'Dist::Zilla version 4.300002, CPAN::Meta::Converter version 2.110440'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,6 +20,7 @@
requires:
File::Spec::Functions: 0
FindBin: 0
+ Getopt::Long: 0
List::MoreUtils: 0
List::Util: 0
Moose: 0
@@ -30,105 +31,107 @@
Version::Requirements: 0.100630
namespace::autoclean: 0
perl: 5.008
+ strict: 0
+ warnings: 0
resources:
- homepage: http://github.com/rjbs/perl-prereqscanner
- repository: http://github.com/rjbs/perl-prereqscanner
+ homepage: https://github.com/rjbs/perl-prereqscanner
+ repository: https://github.com/rjbs/perl-prereqscanner.git
x_MailingList: http://www.listbox.com/subscribe/?list_id=139292
-version: 1.004
+version: 1.008
x_Dist_Zilla:
plugins:
-
class: Dist::Zilla::Plugin::MetaResources
name: MetaResources
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: 0.003
+ version: 0.005
-
class: Dist::Zilla::Plugin::GatherDir
name: '@RJBS/@Basic/GatherDir'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Basic/PruneCruft'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Basic/ManifestSkip'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Basic/MetaYAML'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Basic/License'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Basic/Readme'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@RJBS/@Basic/ExtraTests'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Basic/ExecDir'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Basic/ShareDir'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Basic/MakeMaker'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Basic/Manifest'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Basic/TestRelease'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Basic/ConfirmRelease'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Basic/UploadToCPAN'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::Git::NextVersion
name: '@RJBS/Git::NextVersion'
- version: 1.111460
+ version: 1.112510
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::Repository
name: '@RJBS/Repository'
@@ -140,7 +143,7 @@
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::PodWeaver
name: '@RJBS/PodWeaver'
@@ -148,49 +151,49 @@
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@RJBS/GithubMeta'
- version: 0.12
+ version: 0.22
-
class: Dist::Zilla::Plugin::Git::Check
name: '@RJBS/@Git/Check'
- version: 1.111460
+ version: 1.112510
-
class: Dist::Zilla::Plugin::Git::Commit
name: '@RJBS/@Git/Commit'
- version: 1.111460
+ version: 1.112510
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@RJBS/@Git/Tag'
- version: 1.111460
+ version: 1.112510
-
class: Dist::Zilla::Plugin::Git::Push
name: '@RJBS/@Git/Push'
- version: 1.111460
+ version: 1.112510
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.200006
+ version: 4.300002
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 4.200006
+ version: 4.300002
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.200006
+ version: 4.300002
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/Makefile.PL new/Perl-PrereqScanner-1.008/Makefile.PL
--- old/Perl-PrereqScanner-1.004/Makefile.PL 2011-05-31 03:02:59.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/Makefile.PL 2011-11-01 10:35:51.000000000 +0100
@@ -2,46 +2,49 @@
use strict;
use warnings;
-BEGIN { require 5.008; }
+use 5.008;
use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
- 'ABSTRACT' => 'a tool to scan your Perl code for its prerequisites',
- 'AUTHOR' => 'Jerome Quelin, Ricardo Signes ',
- 'BUILD_REQUIRES' => {
- 'File::Temp' => '0',
- 'PPI::Document' => '0',
- 'Test::More' => '0.96',
- 'Try::Tiny' => '0'
+ "ABSTRACT" => "a tool to scan your Perl code for its prerequisites",
+ "AUTHOR" => "Jerome Quelin, Ricardo Signes ",
+ "BUILD_REQUIRES" => {
+ "File::Temp" => 0,
+ "PPI::Document" => 0,
+ "Test::More" => "0.96",
+ "Try::Tiny" => 0
},
- 'CONFIGURE_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.30'
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.30"
},
- 'DISTNAME' => 'Perl-PrereqScanner',
- 'EXE_FILES' => [
- 'bin/scan_prereqs'
+ "DISTNAME" => "Perl-PrereqScanner",
+ "EXE_FILES" => [
+ "bin/scan_prereqs"
],
- 'LICENSE' => 'perl',
- 'NAME' => 'Perl::PrereqScanner',
- 'PREREQ_PM' => {
- 'File::Spec::Functions' => '0',
- 'FindBin' => '0',
- 'List::MoreUtils' => '0',
- 'List::Util' => '0',
- 'Moose' => '0',
- 'Moose::Role' => '0',
- 'PPI' => '1.205',
- 'Params::Util' => '0',
- 'String::RewritePrefix' => '0.005',
- 'Version::Requirements' => '0.100630',
- 'namespace::autoclean' => '0'
+ "LICENSE" => "perl",
+ "NAME" => "Perl::PrereqScanner",
+ "PREREQ_PM" => {
+ "File::Spec::Functions" => 0,
+ "FindBin" => 0,
+ "Getopt::Long" => 0,
+ "List::MoreUtils" => 0,
+ "List::Util" => 0,
+ "Moose" => 0,
+ "Moose::Role" => 0,
+ "PPI" => "1.205",
+ "Params::Util" => 0,
+ "String::RewritePrefix" => "0.005",
+ "Version::Requirements" => "0.100630",
+ "namespace::autoclean" => 0,
+ "strict" => 0,
+ "warnings" => 0
},
- 'VERSION' => '1.004',
- 'test' => {
- 'TESTS' => 't/*.t'
+ "VERSION" => "1.008",
+ "test" => {
+ "TESTS" => "t/*.t"
}
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/README new/Perl-PrereqScanner-1.008/README
--- old/Perl-PrereqScanner-1.004/README 2011-05-31 03:02:59.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/README 2011-11-01 10:35:51.000000000 +0100
@@ -1,7 +1,7 @@
This archive contains the distribution Perl-PrereqScanner,
-version 1.004:
+version 1.008:
a tool to scan your Perl code for its prerequisites
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/bin/scan_prereqs new/Perl-PrereqScanner-1.008/bin/scan_prereqs
--- old/Perl-PrereqScanner-1.004/bin/scan_prereqs 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/bin/scan_prereqs 2011-11-01 10:35:51.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/perl
package Perl::PrereqScanner::App;
-BEGIN {
- $Perl::PrereqScanner::App::VERSION = '1.004';
+{
+ $Perl::PrereqScanner::App::VERSION = '1.008';
}
# ABSTRACT: scan your working dir for likely prereqs
@@ -14,10 +14,33 @@
use List::Util qw{ max };
use Perl::PrereqScanner;
+use Version::Requirements ();
+
+use Getopt::Long qw{ GetOptions };
+my %options;
+GetOptions(
+ \%options,
+ 'combine!',
+);
+my $combined = $options{combine} && Version::Requirements->new;
foreach my $file ( @ARGV ) {
- print "* $file\n";
- my $prereqs = Perl::PrereqScanner->new->scan_file($file)->as_string_hash;
+ my $prereqs = Perl::PrereqScanner->new->scan_file($file);
+ if( $options{combine} ){
+ $combined->add_requirements($prereqs);
+ }
+ else {
+ print "* $file\n";
+ print_prereqs($prereqs);
+ }
+}
+
+if( $options{combine} ){
+ print_prereqs($combined);
+}
+
+sub print_prereqs {
+ my $prereqs = shift->as_string_hash;
my $max = max map { length } keys %$prereqs;
printf( "%-${max}s = %s\n", $_, $prereqs->{$_} )
for sort keys %$prereqs;
@@ -34,7 +57,7 @@
=head1 VERSION
-version 1.004
+version 1.008
=head1 AUTHORS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/corpus/scan/bar.pl new/Perl-PrereqScanner-1.008/corpus/scan/bar.pl
--- old/Perl-PrereqScanner-1.004/corpus/scan/bar.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/Perl-PrereqScanner-1.008/corpus/scan/bar.pl 2011-11-01 10:35:51.000000000 +0100
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Time::Local qw(timelocal);
+use Exporter ();
+use File::Temp 0.12;
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/corpus/scan/foo.pl new/Perl-PrereqScanner-1.008/corpus/scan/foo.pl
--- old/Perl-PrereqScanner-1.004/corpus/scan/foo.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/Perl-PrereqScanner-1.008/corpus/scan/foo.pl 2011-11-01 10:35:51.000000000 +0100
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use File::Spec ();
+use IO::File 1.08 ();
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/Aliased.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/Aliased.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/Aliased.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/Aliased.pm 2011-11-01 10:35:51.000000000 +0100
@@ -0,0 +1,77 @@
+use strict;
+use warnings;
+
+package Perl::PrereqScanner::Scanner::Aliased;
+{
+ $Perl::PrereqScanner::Scanner::Aliased::VERSION = '1.008';
+}
+use Moose;
+with 'Perl::PrereqScanner::Scanner';
+# ABSTRACT: scan for OO module aliases via aliased.pm
+
+
+sub scan_for_prereqs {
+ my ($self, $ppi_doc, $req) = @_;
+
+ # regular use and require
+ my $includes = $ppi_doc->find('Statement::Include') || [];
+ for my $node ( @$includes ) {
+ # aliasing
+ if (grep { $_ eq $node->module } qw{ aliased }) {
+ # We only want the first argument to aliased
+ my @args = grep {
+ $_->isa('PPI::Token::QuoteLike::Words')
+ || $_->isa('PPI::Token::Quote')
+ } $node->arguments;
+
+ my ($module) = $self->_q_contents($args[0]);
+ $req->add_minimum($module => 0);
+ }
+ }
+}
+
+1;
+
+__END__
+=pod
+
+=head1 NAME
+
+Perl::PrereqScanner::Scanner::Aliased - scan for OO module aliases via aliased.pm
+
+=head1 VERSION
+
+version 1.008
+
+=head1 DESCRIPTION
+
+This scanner will look for aliased OO modules:
+
+ use aliased 'Some::Long::Long::Name' => 'Short::Name';
+
+ Short::Name->new;
+ ...
+
+=head1 AUTHORS
+
+=over 4
+
+=item *
+
+Jerome Quelin
+
+=item *
+
+Ricardo Signes
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2009 by Jerome Quelin.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/Moose.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/Moose.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/Moose.pm 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/Moose.pm 2011-11-01 10:35:51.000000000 +0100
@@ -2,8 +2,8 @@
use warnings;
package Perl::PrereqScanner::Scanner::Moose;
-BEGIN {
- $Perl::PrereqScanner::Scanner::Moose::VERSION = '1.004';
+{
+ $Perl::PrereqScanner::Scanner::Moose::VERSION = '1.008';
}
use Moose;
with 'Perl::PrereqScanner::Scanner';
@@ -124,7 +124,7 @@
=head1 VERSION
-version 1.004
+version 1.008
=head1 DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/POE.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/POE.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/POE.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/POE.pm 2011-11-01 10:35:51.000000000 +0100
@@ -0,0 +1,72 @@
+use strict;
+use warnings;
+
+package Perl::PrereqScanner::Scanner::POE;
+{
+ $Perl::PrereqScanner::Scanner::POE::VERSION = '1.008';
+}
+use Moose;
+with 'Perl::PrereqScanner::Scanner';
+# ABSTRACT: scan for POE components
+
+
+sub scan_for_prereqs {
+ my ($self, $ppi_doc, $req) = @_;
+
+ # regular use and require
+ my $includes = $ppi_doc->find('Statement::Include') || [];
+ for my $node ( @$includes ) {
+ if ( $node->module eq 'POE' ) {
+ my @meat = grep {
+ $_->isa('PPI::Token::QuoteLike::Words')
+ || $_->isa('PPI::Token::Quote')
+ } $node->arguments;
+
+ my @components = map { $self->_q_contents($_) } @meat;
+ $req->add_minimum("POE::$_" => 0) for @components;
+ }
+ }
+}
+
+1;
+
+__END__
+=pod
+
+=head1 NAME
+
+Perl::PrereqScanner::Scanner::POE - scan for POE components
+
+=head1 VERSION
+
+version 1.008
+
+=head1 DESCRIPTION
+
+This scanner will look for POE modules included with C<use POE>
+
+ use POE wq(Component::IRC);
+
+=head1 AUTHORS
+
+=over 4
+
+=item *
+
+Jerome Quelin
+
+=item *
+
+Ricardo Signes
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2009 by Jerome Quelin.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/Perl5.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/Perl5.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/Perl5.pm 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/Perl5.pm 2011-11-01 10:35:51.000000000 +0100
@@ -2,8 +2,8 @@
use warnings;
package Perl::PrereqScanner::Scanner::Perl5;
-BEGIN {
- $Perl::PrereqScanner::Scanner::Perl5::VERSION = '1.004';
+{
+ $Perl::PrereqScanner::Scanner::Perl5::VERSION = '1.008';
}
use Moose;
with 'Perl::PrereqScanner::Scanner';
@@ -22,8 +22,10 @@
next;
}
- # skipping pragmata
- next if grep { $_ eq $node->module } qw{ strict warnings lib feature };
+ # skip lib.pm
+ # lib.pm is not indexed in 02packages, so listing it as a prereq is not a
+ # good idea. -- rjbs, 2011-08-17
+ next if grep { $_ eq $node->module } qw{ lib };
# inheritance
if (grep { $_ eq $node->module } qw{ base parent }) {
@@ -40,14 +42,55 @@
# regular modules
my $version = $node->module_version ? $node->module_version->content : 0;
- # base has been core since perl 5.0
- next if $node->module eq 'base' and not $version;
-
# rt#55851: 'require $foo;' shouldn't add any prereq
- $req->add_minimum($node->module, $version) if $node->module;
+ next unless $node->module;
+
+ # See if the next statement after require is Module->VERSION(min):
+ $version = $self->_check_required_version($node) || 0
+ if not $version and $node->type eq 'require';
+
+ $req->add_minimum($node->module, $version);
}
}
+# For "require Module", see if the next statement is Module->VERSION(min):
+sub _check_required_version {
+ my ($self, $node) = @_;
+
+ my $next = $node->snext_sibling;
+
+ return unless $next and $next->class eq 'PPI::Statement';
+
+ my ($invocant, $op, $method, $list, $too_much) = $next->schildren;
+
+ return unless defined $list # need enough children
+ and $op->class eq 'PPI::Token::Operator'
+ and $op->content eq '->'
+ and $method->content eq 'VERSION'
+ and (not defined $too_much # but not too many children
+ or $too_much->content eq ';')
+ and $invocant->content eq $node->module
+ and $list->class eq 'PPI::Structure::List'
+ and $list->braces eq '()'
+ and $list->schildren == 1;
+
+ my $exp = $list->schild(0);
+
+ return unless $exp->class eq 'PPI::Statement::Expression'
+ and $exp->schildren == 1;
+
+ my $arg = $exp->schild(0);
+
+ if ($arg->isa('PPI::Token::Number')) {
+ return $arg->content;
+ } elsif ($arg->isa('PPI::Token::Quote') and $arg->can('literal')) {
+ return $arg->literal;
+ }
+
+ return; # No minimum version found
+} # end _check_required_version
+
+
1;
__END__
@@ -59,7 +102,7 @@
=head1 VERSION
-version 1.004
+version 1.008
=head1 DESCRIPTION
@@ -77,6 +120,29 @@
=back
+Since Perl does not allow you to supply a version requirement with a
+C<require> statement, the scanner will check the statement after the
+C<require Module> to see if it is C<< Module->VERSION( minimum_version ); >>.
+
+In order to provide a minimum version, that method call must meet the
+following requirements:
+
+=over 4
+
+=item *
+
+it must be the very next statement after C<require Module>. Nothing can separate them but whitespace and comments (and one semicolon).
+
+=item *
+
+C<Module> must be a bareword, and match the C<require> exactly.
+
+=item *
+
+C must be a literal number, v-string, or single-quoted string. Double quotes are not allowed.
+
+=back
+
=head1 AUTHORS
=over 4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/TestMore.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/TestMore.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner/TestMore.pm 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner/TestMore.pm 2011-11-01 10:35:51.000000000 +0100
@@ -2,8 +2,8 @@
use warnings;
package Perl::PrereqScanner::Scanner::TestMore;
-BEGIN {
- $Perl::PrereqScanner::Scanner::TestMore::VERSION = '1.004';
+{
+ $Perl::PrereqScanner::Scanner::TestMore::VERSION = '1.008';
}
# ABSTRACT: scanner to find recent Test::More usage
@@ -36,7 +36,7 @@
=head1 VERSION
-version 1.004
+version 1.008
=head1 DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner/Scanner.pm 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner/Scanner.pm 2011-11-01 10:35:51.000000000 +0100
@@ -2,8 +2,8 @@
use warnings;
package Perl::PrereqScanner::Scanner;
-BEGIN {
- $Perl::PrereqScanner::Scanner::VERSION = '1.004';
+{
+ $Perl::PrereqScanner::Scanner::VERSION = '1.008';
}
use Moose::Role;
# ABSTRACT: something that scans for prereqs in a Perl document
@@ -37,7 +37,7 @@
=head1 VERSION
-version 1.004
+version 1.008
=head1 DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner.pm new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner.pm
--- old/Perl-PrereqScanner-1.004/lib/Perl/PrereqScanner.pm 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/lib/Perl/PrereqScanner.pm 2011-11-01 10:35:51.000000000 +0100
@@ -3,8 +3,8 @@
use warnings;
package Perl::PrereqScanner;
-BEGIN {
- $Perl::PrereqScanner::VERSION = '1.004';
+{
+ $Perl::PrereqScanner::VERSION = '1.008';
}
use Moose;
# ABSTRACT: a tool to scan your Perl code for its prerequisites
@@ -46,7 +46,7 @@
sub BUILD {
my ($self, $arg) = @_;
- my @scanners = @{ $arg->{scanners} || [ qw(Perl5 TestMore Moose) ] };
+ my @scanners = @{ $arg->{scanners} || [ qw(Perl5 TestMore Moose Aliased POE) ] };
my @extra_scanners = @{ $arg->{extra_scanners} || [] };
my $scanners = $self->__prepare_scanners([ @scanners, @extra_scanners ]);
@@ -98,7 +98,7 @@
=head1 VERSION
-version 1.004
+version 1.008
=head1 SYNOPSIS
@@ -134,20 +134,20 @@
L<Moose> roles included with the C<with> keyword
-=back
+=item *
-It will trim the following pragamata: C<strict>, C<warnings>, and C<lib>.
-C<base> is trimmed unless a specific version is required. C<parent> is kept,
-since it's only recently become a core library.
+OO namespace aliasing using the C<aliased> module
+
+=back
=head2 Scanner Plugins
Perl::PrereqScanner works by running a series of scanners over a PPI::Document
-representing the code to scan. By default the "Perl5" and "Moose" scanners
-are run. You can supply your own scanners when constructing your
-PrereqScanner:
+representing the code to scan. By default the "Perl5", "Moose", "TestMore",
+"POE", and "Aliased" scanners are run. You can supply your own scanners when
+constructing your PrereqScanner:
- # Do not use the Moose scanner, only Perl5:
+ # Us only the Perl5 scanner:
my $scanner = Perl::PrereqScanner->new({ plugins => [ qw(Perl5) ] });
# Use any stock plugins, plus Example:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/t/autoprereq.t new/Perl-PrereqScanner-1.008/t/autoprereq.t
--- old/Perl-PrereqScanner-1.004/t/autoprereq.t 2011-05-31 03:02:58.000000000 +0200
+++ new/Perl-PrereqScanner-1.008/t/autoprereq.t 2011-11-01 10:35:51.000000000 +0100
@@ -70,6 +70,45 @@
{ 'Import::IgnoreAPI' => 0 },
);
+prereq_is('require Require; Require->VERSION(0.50);', { Require => '0.50' });
+
+prereq_is('require Require; Require->VERSION(+0.50);', { Require => 0 });
+
+prereq_is('require Require; foo(); Require->VERSION(1.00);', { Require => 0 });
+
+prereq_is(
+ 'require Require; Require->VERSION(v1.0.50);',
+ { Require => 'v1.0.50' }
+);
+
+prereq_is(
+ q{require Require; Require->VERSION('v1.0.50');},
+ { Require => 'v1.0.50' }
+);
+
+prereq_is(
+ 'require Require; Require->VERSION(q[1.00]);',
+ { Require => '1.00' }
+);
+
+prereq_is(
+ 'require Require; Require::Other->VERSION(1.00);',
+ { Require => 0 }
+);
+
+prereq_is(
+ <<'END REQUIRE WITH COMMENT',
+require Require::This; # this comment shouldn't matter
+Require::This->VERSION(0.450);
+END REQUIRE WITH COMMENT
+ { 'Require::This' => '0.450' }, 'require with comment'
+);
+
+prereq_is(
+ 'require Require; Require->VERSION(0.450) if some_condition; ',
+ { 'Require' => 0 }
+);
+
# Moose features
prereq_is(
@@ -144,7 +183,14 @@
},
);
-prereq_is('use base "Base::QQ1";', { 'Base::QQ1' => 0 });
+prereq_is(
+ 'use base "Base::QQ1";',
+ {
+ 'Base::QQ1' => 0,
+ base => 0,
+ },
+);
+
prereq_is(
'use base 10 "Base::QQ1";',
{
@@ -154,7 +200,7 @@
);
prereq_is(
'use base qw{ Base::QW1 Base::QW2 };',
- { 'Base::QW1' => 0, 'Base::QW2' => 0 },
+ { 'Base::QW1' => 0, 'Base::QW2' => 0, base => 0 },
);
prereq_is(
@@ -216,10 +262,9 @@
{},
);
-# test case for ignoring pragmata
prereq_is(
q{use strict; use warnings; use lib '.'; use feature ':5.10';},
- {},
+ { strict => 0, warnings => 0, feature => 0 },
);
prereq_is(
@@ -507,4 +552,49 @@
prereq_is( 'with;', {}, );
prereq_is( 'with foo;', {} );
+# test cases for aliased.pm
+prereq_is(
+ q{use aliased 'Long::Custom::Class::Name'},
+ {
+ 'aliased' => 0,
+ 'Long::Custom::Class::Name' => 0,
+ },
+);
+
+prereq_is(
+ q{use aliased 0.30 'Long::Custom::Class::Name'},
+ {
+ 'aliased' => '0.30',
+ 'Long::Custom::Class::Name' => 0,
+ },
+);
+
+
+prereq_is(
+ q{use aliased 'Long::Custom::Class::Name' => 'Name'},
+ {
+ 'aliased' => 0,
+ 'Long::Custom::Class::Name' => 0,
+ },
+);
+
+# test cases for POE
+prereq_is(
+ q{use POE 'Component::IRC'},
+ {
+ 'POE' => 0,
+ 'POE::Component::IRC' => 0,
+ },
+);
+
+prereq_is(
+ q{use POE qw/Component::IRC Component::Server::NNTP/},
+ {
+ 'POE' => 0,
+ 'POE::Component::IRC' => 0,
+ 'POE::Component::Server::NNTP' => 0,
+ },
+);
+
+
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Perl-PrereqScanner-1.004/t/scan_prereqs.t new/Perl-PrereqScanner-1.008/t/scan_prereqs.t
--- old/Perl-PrereqScanner-1.004/t/scan_prereqs.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Perl-PrereqScanner-1.008/t/scan_prereqs.t 2011-11-01 10:35:51.000000000 +0100
@@ -0,0 +1,56 @@
+#!perl
+use strict;
+use warnings;
+
+use File::Temp qw{ tempfile };
+use Perl::PrereqScanner;
+use PPI::Document;
+use Try::Tiny;
+use File::Spec::Functions;
+
+use Test::More;
+
+# try to be cross-platform
+my $script = catfile(qw(bin scan_prereqs));
+my $files = join(' ', map { catfile(qw(corpus scan), "$_.pl") } qw(foo bar));
+
+# depending on exact output match is a bit fragile and may become cumbersome
+# but we'll try it for now.
+foreach my $test (
+ [default => '' => <