Package-DeprecationManager-0.13/0000755000175000017500000000000011726413247016365 5ustar autarchautarchPackage-DeprecationManager-0.13/MANIFEST0000644000175000017500000000047411726413247017523 0ustar autarchautarchChanges INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Package/DeprecationManager.pm t/basic.t t/compile.t t/release-cpan-changes.t t/release-eol.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-linkcheck.t t/release-pod-no404s.t t/release-pod-spell.t t/release-pod-syntax.t Package-DeprecationManager-0.13/t/0000755000175000017500000000000011726413247016630 5ustar autarchautarchPackage-DeprecationManager-0.13/t/release-pod-spell.t0000644000175000017500000000115511726413247022334 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::Spelling; my @stopwords; for () { chomp; push @stopwords, $_ unless /\A (?: \# | \s* \z)/msx; # skip comments, whitespace } add_stopwords(@stopwords); set_spell_cmd('aspell list -l en'); # This prevents a weird segfault from the aspell command - see # https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322 local $ENV{LC_ALL} = 'C'; all_pod_files_spelling_ok; __DATA__ Goro PayPal Rolsky api Package-DeprecationManager-0.13/t/compile.t0000644000175000017500000000026311726413247020446 0ustar autarchautarchuse strict; use warnings; use Test::More 0.88; eval "require Package::DeprecationManager"; ok( ! $@, 'no errors loading require Package::DeprecationManager' ); done_testing(); Package-DeprecationManager-0.13/t/release-no-tabs.t0000644000175000017500000000045011726413247021775 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::NoTabs'; plan skip_all => 'Test::NoTabs required' if $@; all_perl_files_ok(); Package-DeprecationManager-0.13/t/basic.t0000644000175000017500000001166111726413247020103 0ustar autarchautarchuse strict; use warnings; use Test::Fatal; use Test::More 0.88; use Test::Requires { 'Test::Output' => '0.16', }; { like( exception { eval 'package Foo; use Package::DeprecationManager;'; die $@ if $@; }, qr/^\QYou must provide a hash reference -deprecations parameter when importing Package::DeprecationManager/, 'must provide a set of deprecations when using Package::DeprecationManager' ); } { package Foo; use Package::DeprecationManager -deprecations => { 'Foo::foo' => '0.02', 'Foo::bar' => '0.03', 'Foo::baz' => '1.21', 'not a sub' => '1.23', }; sub foo { deprecated('foo is deprecated'); } sub bar { deprecated('bar is deprecated'); } sub baz { deprecated(); } sub quux { if ( $_[0] > 5 ) { deprecated( message => 'quux > 5 has been deprecated', feature => 'not a sub', ); } } sub varies { deprecated("The varies sub varies: $_[0]"); } } { package Bar; Foo->import(); ::stderr_like{ Foo::foo() } qr/\Qfoo is deprecated/, 'deprecation warning for foo'; ::stderr_like{ Foo::bar() } qr/\Qbar is deprecated/, 'deprecation warning for bar'; ::stderr_like{ Foo::baz() } qr/\QFoo::baz has been deprecated since version 1.21/, 'deprecation warning for baz, and message is generated by Package::DeprecationManager'; ::stderr_is{ Foo::foo() } q{}, 'no warning on second call to foo'; ::stderr_is{ Foo::bar() } q{}, 'no warning on second call to bar'; ::stderr_is{ Foo::baz() } q{}, 'no warning on second call to baz'; ::stderr_like{ Foo::varies(1) } qr/\QThe varies sub varies: 1/, 'warning for varies sub'; ::stderr_like{ Foo::varies(2) } qr/\QThe varies sub varies: 2/, 'warning for varies sub with different error'; ::stderr_is{ Foo::varies(1) } q{}, 'no warning for varies sub with same message as first call'; } { package Baz; Foo->import( -api_version => '0.01' ); ::stderr_is{ Foo::foo() } q{}, 'no warning for foo with api_version = 0.01'; ::stderr_is{ Foo::bar() } q{}, 'no warning for bar with api_version = 0.01'; ::stderr_is{ Foo::baz() } q{}, 'no warning for baz with api_version = 0.01'; } { package Quux; Foo->import( -api_version => '1.17' ); ::stderr_like{ Foo::foo() } qr/\Qfoo is deprecated/, 'deprecation warning for foo with api_version = 1.17'; ::stderr_like{ Foo::bar() } qr/\Qbar is deprecated/, 'deprecation warning for bar with api_version = 1.17'; ::stderr_is{ Foo::baz() } q{}, 'no warning for baz with api_version = 1.17'; } { package Another; Foo->import(); ::stderr_is{ Foo::quux(1) } q{}, 'no warning for quux(1)'; ::stderr_like{ Foo::quux(10) } qr/\Qquux > 5 has been deprecated/, 'got a warning for quux(10)'; } { package Dep; use Package::DeprecationManager -deprecations => { 'Dep::foo' => '1.00', }, -ignore => [ 'My::Package1', 'My::Package2' ]; sub foo { deprecated('foo is deprecated'); } } { package Dep2; use Package::DeprecationManager -deprecations => { 'Dep2::bar' => '1.00', }, -ignore => [ qr/My::Package[12]/ ]; sub bar { deprecated('bar is deprecated'); } } { package My::Package1; sub foo { Dep::foo() } sub bar { Dep2::bar() } } { package My::Package2; sub foo { My::Package1::foo() } sub bar { My::Package1::bar() } } { package My::Baz; ::stderr_like{ My::Package2::foo() } qr/^foo is deprecated at t.basic\.t line \d+\.?\s+My::Baz/, 'deprecation warning for call to My::Package2::foo() and mentions My::Baz but not My::Package[12]'; ::stderr_is{ My::Package2::foo() } q{}, 'no deprecation warning for second call to My::Package2::foo()'; ::stderr_is{ My::Package1::foo() } q{}, 'no deprecation warning for call to My::Package1::foo()'; ::stderr_like{ My::Package2::bar() } qr/^bar is deprecated at t.basic\.t line \d+\.?\s+My::Baz/, 'deprecation warning for call to My::Package2::foo() and mentions My::Baz but not My::Package[12]'; ::stderr_is{ My::Package2::bar() } q{}, 'no deprecation warning for second call to My::Package2::bar()'; } { package My::Quux; ::stderr_like{ My::Package1::foo() } qr/^foo is deprecated at t.basic\.t line \d+\.?\s+My::Quux/, 'deprecation warning for call to My::Package1::foo() and mentions My::Quux but not My::Package[12]'; ::stderr_is{ My::Package1::foo() } q{}, 'no deprecation warning for second call to My::Package1::foo()'; } done_testing(); Package-DeprecationManager-0.13/t/release-pod-linkcheck.t0000644000175000017500000000077511726413247023157 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Package-DeprecationManager-0.13/t/release-eol.t0000644000175000017500000000047611726413247021221 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); Package-DeprecationManager-0.13/t/release-pod-syntax.t0000644000175000017500000000045011726413247022540 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); Package-DeprecationManager-0.13/t/release-pod-no404s.t0000644000175000017500000000076511726413247022252 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } Package-DeprecationManager-0.13/t/release-pod-coverage.t0000644000175000017500000000076511726413247023016 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Package-DeprecationManager-0.13/t/release-cpan-changes.t0000644000175000017500000000047111726413247022764 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval 'use Test::CPAN::Changes'; plan skip_all => 'Test::CPAN::Changes required for this test' if $@; changes_ok(); done_testing(); Package-DeprecationManager-0.13/lib/0000755000175000017500000000000011726413247017133 5ustar autarchautarchPackage-DeprecationManager-0.13/lib/Package/0000755000175000017500000000000011726413247020466 5ustar autarchautarchPackage-DeprecationManager-0.13/lib/Package/DeprecationManager.pm0000644000175000017500000001660211726413247024561 0ustar autarchautarchpackage Package::DeprecationManager; { $Package::DeprecationManager::VERSION = '0.13'; } use strict; use warnings; use Carp qw( croak ); use List::MoreUtils qw( any ); use Params::Util qw( _HASH0 ); use Sub::Install; sub import { shift; my %args = @_; croak 'You must provide a hash reference -deprecations parameter when importing Package::DeprecationManager' unless $args{-deprecations} && _HASH0( $args{-deprecations} ); my %registry; my $import = _build_import( \%registry ); my $warn = _build_warn( \%registry, $args{-deprecations}, $args{-ignore} ); my $caller = caller(); Sub::Install::install_sub( { code => $import, into => $caller, as => 'import', } ); Sub::Install::install_sub( { code => $warn, into => $caller, as => 'deprecated', } ); return; } sub _build_import { my $registry = shift; return sub { my $class = shift; my %args = @_; $args{-api_version} ||= delete $args{-compatible}; $registry->{ caller() } = $args{-api_version} if $args{-api_version}; return; }; } sub _build_warn { my $registry = shift; my $deprecated_at = shift; my $ignore = shift; my %ignore = map { $_ => 1 } grep { !ref } @{ $ignore || [] }; my @ignore_res = grep {ref} @{ $ignore || [] }; my %warned; return sub { my %args = @_ < 2 ? ( message => shift ) : @_; my ( $package, undef, undef, $sub ) = caller(1); my $skipped = 1; if ( @ignore_res || keys %ignore ) { while ( defined $package && ( $ignore{$package} || any { $package =~ $_ } @ignore_res ) ) { $package = caller( $skipped++ ); } } $package = 'unknown package' unless defined $package; unless ( defined $args{feature} ) { $args{feature} = $sub; } my $compat_version = $registry->{$package}; my $deprecated_at = $deprecated_at->{ $args{feature} }; return if defined $compat_version && defined $deprecated_at && $compat_version lt $deprecated_at; my $msg; if ( defined $args{message} ) { $msg = $args{message}; } else { $msg = "$args{feature} has been deprecated"; $msg .= " since version $deprecated_at" if defined $deprecated_at; } return if $warned{$package}{ $args{feature} }{$msg}; $warned{$package}{ $args{feature} }{$msg} = 1; # We skip at least two levels. One for this anon sub, and one for the # sub calling it. local $Carp::CarpLevel = $Carp::CarpLevel + $skipped; Carp::cluck($msg); }; } 1; # ABSTRACT: Manage deprecation warnings for your distribution =pod =head1 NAME Package::DeprecationManager - Manage deprecation warnings for your distribution =head1 VERSION version 0.13 =head1 SYNOPSIS package My::Class; use Package::DeprecationManager -deprecations => { 'My::Class::foo' => '0.02', 'My::Class::bar' => '0.05', 'feature-X' => '0.07', }; sub foo { deprecated( 'Do not call foo!' ); ... } sub bar { deprecated(); ... } sub baz { my %args = @_; if ( $args{foo} ) { deprecated( message => ..., feature => 'feature-X', ); } } package Other::Class; use My::Class -api_version => '0.04'; My::Class->new()->foo(); # warns My::Class->new()->bar(); # does not warn My::Class->new()->bar(); # does not warn again =head1 DESCRIPTION This module allows you to manage a set of deprecations for one or more modules. When you import C, you must provide a set of C<-deprecations> as a hash ref. The keys are "feature" names, and the values are the version when that feature was deprecated. In many cases, you can simply use the fully qualified name of a subroutine or method as the feature name. This works for cases where the whole subroutine is deprecated. However, the feature names can be any string. This is useful if you don't want to deprecate an entire subroutine, just a certain usage. You can also provide an optional array reference in the C<-ignore> parameter. The values to be ignored can be package names or regular expressions (made with C). Use this to ignore packages in your distribution that can appear on the call stack when a deprecated feature is used. As part of the import process, C will export two subroutines into its caller. It provides an C sub for the caller and a C sub. The C sub allows callers of I class to specify an C<-api_version> parameter. If this is supplied, then deprecation warnings are only issued for deprecations for api versions earlier than the one specified. You must call the C sub in each deprecated subroutine. When called, it will issue a warning using C. The C sub can be called in several ways. If you do not pass any arguments, it will generate an appropriate warning message. If you pass a single argument, this is used as the warning message. Finally, you can call it with named arguments. Currently, the only allowed names are C and C. The C argument should correspond to the feature name passed in the C<-deprecations> hash. If you don't explicitly specify a feature, the C sub uses C to identify its caller, using its fully qualified subroutine name. A given deprecation warning is only issued once for a given package. This module tracks this based on both the feature name I the error message itself. This means that if you provide several different error messages for the same feature, all of those errors will appear. =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that B in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time, which seems unlikely at best. To donate, log into PayPal and send money to autarch@urth.org or use the button on this page: L =head1 CREDITS The idea for this functionality and some of its implementation was originally created as L by Goro Fuji. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2012 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut __END__ Package-DeprecationManager-0.13/README0000644000175000017500000000042411726413247017245 0ustar autarchautarch This archive contains the distribution Package-DeprecationManager, version 0.13: Manage deprecation warnings for your distribution This software is Copyright (c) 2012 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) Package-DeprecationManager-0.13/LICENSE0000644000175000017500000002152011726413247017372 0ustar autarchautarchThis software is Copyright (c) 2012 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Package-DeprecationManager-0.13/META.yml0000644000175000017500000000136411726413247017642 0ustar autarchautarch--- abstract: 'Manage deprecation warnings for your distribution' author: - 'Dave Rolsky ' build_requires: Test::Fatal: 0 Test::More: 0.88 Test::Requires: 0 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300009, CPAN::Meta::Converter version 2.120351' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Package-DeprecationManager requires: Carp: 0 List::MoreUtils: 0 Params::Util: 0 Sub::Install: 0 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Package-DeprecationManager repository: git://git.moose.perl.org/Package-DeprecationManager.git version: 0.13 Package-DeprecationManager-0.13/Makefile.PL0000644000175000017500000000231411726413247020337 0ustar autarchautarch use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Manage deprecation warnings for your distribution", "AUTHOR" => "Dave Rolsky ", "BUILD_REQUIRES" => { "Test::Fatal" => 0, "Test::More" => "0.88", "Test::Requires" => 0 }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Package-DeprecationManager", "EXE_FILES" => [], "LICENSE" => "artistic_2", "NAME" => "Package::DeprecationManager", "PREREQ_PM" => { "Carp" => 0, "List::MoreUtils" => 0, "Params::Util" => 0, "Sub::Install" => 0, "strict" => 0, "warnings" => 0 }, "VERSION" => "0.13", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Package-DeprecationManager-0.13/Changes0000644000175000017500000000324411726413247017663 0ustar autarchautarch0.13 2012-03-09 - Fix dist.ini to not add Test::Spelling as a requirement. (Tomas Doran) 0.12 2012-03-04 - Fix tests to pass with Carp 1.25. Reported by Andreas Koenig. RT #75520. 0.11 2011-06-19 - Allow an empty hash for the -deprecations parameter. 0.10 2010-10-25 - The test suite now uses Test::Fatal instead of Test::Exception. (Karen Etheridge) 0.09 2010-10-17 - Added a compilation test, because otherwise all test files could not end up doing skip_all, which may make smokers and test harnesses unhappy. 0.08 2010-10-15 - Include Test::Requires in prereq list. Reported by Todd Rinaldo. RT #62173. 0.07 2010-10-15 - The use of regular expressions in ignores didn't really work in 0.06. - Added missing dep on List::MoreUtils. - Replaced Test::Warn with Test::Output in the tests, and made the tests actually test what I think they should be testing. 0.06 2010-10-14 - The -ignore parameter now accepts regular expressions as well as package names. 0.05 2010-10-14 - Fixed what looked like a bug in -ignore handling, although I couldn't seem to write a test that triggered it. - Removed hard dep on Test::Warn for the benefit of Moose. 0.04 2010-07-14 - A single feature will now warn more than once if each warning consists of a different error message. 0.03 2010-07-14 - Added an -ignore parameter when importing Package::DeprecationManager. This lets you explicitly ignore packages in the call stack when determining where a deprecated feature was called. 0.02 2010-07-12 - Made it possible to deprecate any feature, not just a subroutine or method. 0.01 2010-07-12 - First release Package-DeprecationManager-0.13/META.json0000644000175000017500000000274011726413247020011 0ustar autarchautarch{ "abstract" : "Manage deprecation warnings for your distribution", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300009, CPAN::Meta::Converter version 2.120351", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Package-DeprecationManager", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "runtime" : { "requires" : { "Carp" : "0", "List::MoreUtils" : "0", "Params::Util" : "0", "Sub::Install" : "0", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "Test::Fatal" : "0", "Test::More" : "0.88", "Test::Requires" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-package-deprecationmanager@rt.cpan.org", "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Package-DeprecationManager" }, "repository" : { "type" : "git", "url" : "git://git.moose.perl.org/Package-DeprecationManager.git", "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Package-DeprecationManager.git;a=summary" } }, "version" : "0.13" } Package-DeprecationManager-0.13/INSTALL0000644000175000017500000000203411726413247017415 0ustar autarchautarch This is the Perl distribution Package-DeprecationManager. Installing Package-DeprecationManager is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Package::DeprecationManager If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Package::DeprecationManager ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Package::DeprecationManager ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation Package-DeprecationManager documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Package::DeprecationManager Package-DeprecationManager-0.13/dist.ini0000644000175000017500000000151311726413247020031 0ustar autarchautarchname = Package-DeprecationManager author = Dave Rolsky license = Artistic_2_0 copyright_holder = Dave Rolsky version = 0.13 [NextRelease] format = %-8v %{yyyy-MM-dd}d [@Basic] [InstallGuide] [MetaJSON] [MetaResources] bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=Package-DeprecationManager bugtracker.mailto = bug-package-deprecationmanager@rt.cpan.org repository.url = git://git.moose.perl.org/Package-DeprecationManager.git repository.web = http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Package-DeprecationManager.git;a=summary repository.type = git [SurgicalPodWeaver] [PkgVersion] [EOLTests] [NoTabsTests] [PodCoverageTests] [PodSyntaxTests] [Test::CPAN::Changes] [Test::Pod::LinkCheck] [Test::Pod::No404s] [AutoPrereqs] skip = ^Test::Spelling$ [CheckPrereqsIndexed] [@Git]