[libmoosex-has-sugar-perl] 27/29: Ditch Sub::Exporter and use Sub::Exporter::Progressive, removing deprecated features in the process
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag 1.000000-source
in repository libmoosex-has-sugar-perl.
commit dfccd0f5e0f5f38f5520638bd0b69a62bbba0ca7
Author: Kent Fredric <kentfredric at gmail.com>
Date: Fri Jan 31 08:05:59 2014 +1300
Ditch Sub::Exporter and use Sub::Exporter::Progressive, removing deprecated features in the process
---
Changes | 1 +
Changes.deps | 6 ++++++
Changes.deps.all | 6 ++++++
lib/MooseX/Has/Sugar.pm | 38 +++++++++++---------------------------
lib/MooseX/Has/Sugar/Minimal.pm | 18 +++++++-----------
lib/MooseX/Has/Sugar/Saccharin.pm | 24 ++++++++++++------------
t/lib/T4Values/TestCant.pm | 10 ++++------
7 files changed, 47 insertions(+), 56 deletions(-)
diff --git a/Changes b/Changes
index d970f39..63fbc80 100644
--- a/Changes
+++ b/Changes
@@ -7,6 +7,7 @@
- build: -1
- configure: +2 -1
- develop: +9 ↑1 -9
+ - runtime: +1 -1
- test: +11 ↓1 -3
0.05070422 2013-11-20T08:32:12Z
diff --git a/Changes.deps b/Changes.deps
index 610794d..4d96da8 100644
--- a/Changes.deps
+++ b/Changes.deps
@@ -5,6 +5,9 @@
[Added / configure requires]
- ExtUtils::MakeMaker 6.30
+ [Added / runtime requires]
+ - Sub::Exporter::Progressive
+
[Added / test recommends]
- CPAN::Meta
- CPAN::Meta::Requirements 2.120900
@@ -29,6 +32,9 @@
[Removed / configure requires]
- Module::Build 0.4202
+ [Removed / runtime requires]
+ - Sub::Exporter
+
[Removed / test requires]
- Moose
- MooseX::Types::Moose
diff --git a/Changes.deps.all b/Changes.deps.all
index 6a1fd25..cb12ee5 100644
--- a/Changes.deps.all
+++ b/Changes.deps.all
@@ -16,6 +16,9 @@
- Moose
- MooseX::Types::Moose
+ [Added / runtime requires]
+ - Sub::Exporter::Progressive
+
[Added / test recommends]
- CPAN::Meta
- CPAN::Meta::Requirements 2.120900
@@ -54,6 +57,9 @@
- Dist::Zilla::Plugin::ReportVersions::Tiny
- version 0.9901
+ [Removed / runtime requires]
+ - Sub::Exporter
+
[Removed / test requires]
- Moose
- MooseX::Types::Moose
diff --git a/lib/MooseX/Has/Sugar.pm b/lib/MooseX/Has/Sugar.pm
index f1e2fe7..6565045 100644
--- a/lib/MooseX/Has/Sugar.pm
+++ b/lib/MooseX/Has/Sugar.pm
@@ -122,8 +122,17 @@ Or even
=cut
-use Carp ();
-use Sub::Exporter ();
+use Carp ();
+use Sub::Exporter::Progressive (
+ -setup => {
+ exports => [ 'ro', 'rw', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', 'bare', ],
+ groups => {
+ isattrs => [ 'ro', 'rw', 'bare', ],
+ attrs => [ 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', ],
+ default => [ 'ro', 'rw', 'bare', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', ],
+ },
+ },
+);
=export_group C<:default>
@@ -168,31 +177,6 @@ B<DEPRECATED>, just use L</:default> or do
=cut
-Sub::Exporter::setup_exporter(
- {
- as => 'do_import',
- exports => [ 'ro', 'rw', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', 'bare', ],
- groups => {
- isattrs => [ 'ro', 'rw', 'bare', ],
- attrs => [ 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', ],
- default => [ '-attrs', '-isattrs', ],
- },
- },
-);
-
-sub import {
- for (@_) {
- if ( $_ =~ qr/^[:-]is\$/ ) {
- Carp::croak( qq{Trivial ro/rw with :is dropped as of 0.0300.\n} . q{ See MooseX::Has::Sugar::Minimal for those. } );
- }
- if ( $_ =~ qr/^[:-]allattrs\$/ ) {
- Carp::carp( q{MooseX::Has::Sugar->import(:allattrs) is deprecated.} . q{ just do 'use MooseX::Has::Sugar;' instead.} );
- $_ =~ s/^[:-]allattrs\$/:default/;
- }
- }
- goto &MooseX::Has::Sugar::do_import;
-}
-
=export_function C<bare>
returns C<('is','bare')>
diff --git a/lib/MooseX/Has/Sugar/Minimal.pm b/lib/MooseX/Has/Sugar/Minimal.pm
index 145f3f9..6c60469 100644
--- a/lib/MooseX/Has/Sugar/Minimal.pm
+++ b/lib/MooseX/Has/Sugar/Minimal.pm
@@ -8,7 +8,13 @@ package MooseX::Has::Sugar::Minimal;
# AUTHORITY
-use Sub::Exporter ();
+use Sub::Exporter::Progressive -setup => {
+ exports => [ 'ro', 'rw', 'bare', ],
+ groups => {
+ is => [ 'ro', 'rw', 'bare', ],
+ default => [ '-all', ],
+ },
+};
=head1 SYNOPSIS
@@ -43,16 +49,6 @@ Exports L</bare>, L</ro>, L</rw>
=cut
-Sub::Exporter::setup_exporter(
- {
- exports => [ 'ro', 'rw', 'bare', ],
- groups => {
- is => [ 'ro', 'rw', 'bare', ],
- default => [ '-is', ],
- },
- },
-);
-
=export_function C<bare>
returns C<('bare')>
diff --git a/lib/MooseX/Has/Sugar/Saccharin.pm b/lib/MooseX/Has/Sugar/Saccharin.pm
index 86386e2..8bca7ac 100644
--- a/lib/MooseX/Has/Sugar/Saccharin.pm
+++ b/lib/MooseX/Has/Sugar/Saccharin.pm
@@ -21,8 +21,18 @@ Your choice.
=cut
-use Carp ();
-use Sub::Exporter ();
+use Carp ();
+use Sub::Exporter::Progressive (
+ -setup => {
+ exports => [
+ 'ro', 'rw', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref',
+ 'bare', 'default', 'init_arg', 'predicate', 'clearer', 'builder', 'trigger',
+ ],
+ groups => {
+ default => ['-all'],
+ },
+ },
+);
=export_group C<:default>
@@ -37,16 +47,6 @@ L</bare>, L</default>, L</init_arg>, L</predicate>, L</clearer>, L</builder>, L<
=cut
-Sub::Exporter::setup_exporter(
- {
- exports => [
- 'ro', 'rw', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref',
- 'bare', 'default', 'init_arg', 'predicate', 'clearer', 'builder', 'trigger',
- ],
- groups => { default => ['-all'], },
- },
-);
-
=export_function C<bare>
=export_function C<bare> C<$Type>
diff --git a/t/lib/T4Values/TestCant.pm b/t/lib/T4Values/TestCant.pm
index 0752ff1..ae80858 100644
--- a/t/lib/T4Values/TestCant.pm
+++ b/t/lib/T4Values/TestCant.pm
@@ -3,16 +3,14 @@ package T4Values::TestCant;
# $Id:$
use strict;
use warnings;
-use Test::More ();
-use Sub::Exporter ();
-use namespace::clean -except => 'meta';
-
-Sub::Exporter::setup_exporter(
- {
+use Test::More ();
+use Sub::Exporter::Progressive (
+ -setup => {
exports => ['can_unok'],
groups => { default => ['can_unok'] },
}
);
+use namespace::clean -except => 'import';
# Sniped from Test::More;
sub can_unok($@) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoosex-has-sugar-perl.git
More information about the Pkg-perl-cvs-commits
mailing list