@@ -1,4 +1,10 @@
-Changes for 0.02 Sat Dec 13 18:35:01 CET 2008
+0.04 Thu Oct 24 20:34:00 BST 2013
+=================================================
+* Update Makefile.PL to add repository et al
+* Install into site if >= v5.12.0
+* Add use deprecate due to core scheduled removal
+
+0.02 Sat Dec 13 18:35:01 CET 2008
=================================================
* Users of 0.01 need not upgrade
* Package::Constants is a core module, so the Makefile.PL
@@ -4,4 +4,5 @@ Makefile.PL
MANIFEST This list of files
README
t/01_list.t
-META.yml Module meta-data (added by MakeMaker)
+META.yml Module YAML meta-data (added by MakeMaker)
+META.json Module JSON meta-data (added by MakeMaker)
@@ -0,0 +1,46 @@
+{
+ "abstract" : "List constants defined in a package",
+ "author" : [
+ "Jos Boumans <kane[at]cpan.org>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 2.132830",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Package-Constants",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Test::More" : "0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "repository" : {
+ "url" : "git://github.com/jib/package-constants.git"
+ }
+ },
+ "version" : "0.04"
+}
@@ -1,11 +1,24 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Package-Constants
-version: 0.02
-version_from: lib/Package/Constants.pm
-installdirs: site
+---
+abstract: 'List constants defined in a package'
+author:
+ - 'Jos Boumans <kane[at]cpan.org>'
+build_requires:
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.8, CPAN::Meta::Converter version 2.132830'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Package-Constants
+no_index:
+ directory:
+ - t
+ - inc
requires:
- Test::More: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+ Test::More: 0
+resources:
+ repository: git://github.com/jib/package-constants.git
+version: 0.04
@@ -1,13 +1,43 @@
use ExtUtils::MakeMaker;
use strict;
-WriteMakefile (
+WriteMakefile1(
+ LICENSE => 'perl',
+ META_MERGE => {
+ resources => {
+ repository => 'git://github.com/jib/package-constants.git',
+ },
+ },
+
NAME => 'Package::Constants',
VERSION_FROM => 'lib/Package/Constants.pm', # finds $VERSION
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz' },
PREREQ_PM => { 'Test::More' => 0,
},
- INSTALLDIRS => ( $] >= 5.009005 ? 'perl' : 'site' ),
+ INSTALLDIRS => ( $] >= 5.009005 && $] < 5.012 ? 'perl' : 'site' ),
AUTHOR => 'Jos Boumans <kane[at]cpan.org>',
- ABSTRACT => 'List constants defined in a package'
-);
+ ABSTRACT => 'List constants defined in a package'
+);
+
+sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.
+ my %params=@_;
+ my $eumm_version=$ExtUtils::MakeMaker::VERSION;
+ $eumm_version=eval $eumm_version;
+ die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
+ die "License not specified" if not exists $params{LICENSE};
+ if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
+ #EUMM 6.5502 has problems with BUILD_REQUIRES
+ $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
+ delete $params{BUILD_REQUIRES};
+ }
+ delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
+ delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
+ delete $params{META_MERGE} if $eumm_version < 6.46;
+ delete $params{META_ADD} if $eumm_version < 6.46;
+ delete $params{LICENSE} if $eumm_version < 6.31;
+ delete $params{AUTHOR} if $] < 5.005;
+ delete $params{ABSTRACT_FROM} if $] < 5.005;
+ delete $params{BINARY_LOCATION} if $] < 5.005;
+
+ WriteMakefile(%params);
+}
@@ -1,19 +1,21 @@
package Package::Constants;
+use if $] >= 5.019006, 'deprecate';
+
use strict;
use vars qw[$VERSION $DEBUG];
-$VERSION = '0.02';
+$VERSION = '0.04';
$DEBUG = 0;
-=head1 NAME
+=head1 NAME
Package::Constants - List all constants declared in a package
=head1 SYNOPSIS
use Package::Constants;
-
+
### list the names of all constants in a given package;
@const = Package::Constants->list( __PACKAGE__ );
@const = Package::Constants->list( 'main' );
@@ -23,8 +25,8 @@ Package::Constants - List all constants declared in a package
=head1 DESCRIPTION
-C<Package::Constants> lists all the constants defined in a certain
-package. This can be useful for, among others, setting up an
+C<Package::Constants> lists all the constants defined in a certain
+package. This can be useful for, among others, setting up an
autogenerated C<@EXPORT/@EXPORT_OK> for a Constants.pm file.
=head1 CLASS METHODS
@@ -39,23 +41,23 @@ sub list {
my $class = shift;
my $pkg = shift;
return unless defined $pkg; # some joker might use '0' as a pkg...
-
+
_debug("Inspecting package '$pkg'");
-
+
my @rv;
{ no strict 'refs';
my $stash = $pkg . '::';
for my $name (sort keys %$stash ) {
-
+
_debug( " Checking stash entry '$name'" );
-
+
### is it a subentry?
my $sub = $pkg->can( $name );
next unless defined $sub;
-
+
_debug( " '$name' is a coderef" );
-
+
next unless defined prototype($sub) and
not length prototype($sub);
@@ -63,7 +65,7 @@ sub list {
push @rv, $name;
}
}
-
+
return sort @rv;
}
@@ -93,7 +95,7 @@ This module by Jos Boumans E<lt>kane@cpan.orgE<gt>.
=head1 COPYRIGHT
-This library is free software; you may redistribute and/or modify it
+This library is free software; you may redistribute and/or modify it
under the same terms as Perl itself.
=cut