MT#20543 Finish removal of Moose, Moosex and Perl5i

Update the test suite, the documentation and the Build-Depends.

Missed in commit 696ed5b508.

Change-Id: I0e4f33f931138fba04d411fa58d21cb428c5328f
changes/49/6649/2
Guillem Jover 10 years ago
parent 7c2a0e8241
commit 32a5bd2f0e

@ -8,7 +8,6 @@ my $builder = Module::Build->new(
'Module::Build' => '0.4004', 'Module::Build' => '0.4004',
}, },
test_requires => { test_requires => {
'Moose::Util::TypeConstraints' => 0,
'Test::DescribeMe' => 0, 'Test::DescribeMe' => 0,
'Test::More' => '0.88', 'Test::More' => '0.88',
}, },
@ -16,11 +15,8 @@ my $builder = Module::Build->new(
'autodie' => 0, 'autodie' => 0,
'indirect' => 'v0.30', 'indirect' => 'v0.30',
'Module::Runtime' => 0, 'Module::Runtime' => 0,
'Moose' => 2,
'MooseX::Method::Signatures' => 0,
'parent' => 0, 'parent' => 0,
'perl' => '5.014', 'perl' => '5.014',
'perl5i::2' => 'v2.12',
'strictures' => 1, 'strictures' => 1,
'TryCatch' => 0, 'TryCatch' => 0,
'utf8' => 0, 'utf8' => 0,

24
debian/control vendored

@ -2,23 +2,21 @@ Source: libsipwise-base-perl
Section: perl Section: perl
Priority: extra Priority: extra
Maintainer: Sipwise Development Team <support@sipwise.com> Maintainer: Sipwise Development Team <support@sipwise.com>
Build-Depends: debhelper (>= 8), Build-Depends:
libindirect-perl (>= 0.30), debhelper (>= 8),
libmoosex-method-signatures-perl, libindirect-perl (>= 0.30),
libperl5i-perl (>= 2.12), libstrictures-perl,
libstrictures-perl, libtrycatch-perl,
libtrycatch-perl
Standards-Version: 3.9.7 Standards-Version: 3.9.7
Homepage: http://sipwise.com/ Homepage: http://sipwise.com/
Package: libsipwise-base-perl Package: libsipwise-base-perl
Architecture: all Architecture: all
Depends: libindirect-perl (>= 0.30), Depends:
libmoosex-method-signatures-perl, libindirect-perl (>= 0.30),
libperl5i-perl (>= 2.12), libstrictures-perl,
libstrictures-perl, libtrycatch-perl,
libtrycatch-perl, ${misc:Depends},
${misc:Depends}, ${perl:Depends},
${perl:Depends}
Description: Perl module Sipwise::Base Description: Perl module Sipwise::Base
TODO TODO

@ -52,8 +52,8 @@ The purpose of this module is to reduce the amount of boilerplate code and to en
available by default. This is in the spirit of available by default. This is in the spirit of
L<http://modernperlbooks.com/mt/2009/10/remove-the-little-pessimizations.html|eliminating pessimisations>. L<http://modernperlbooks.com/mt/2009/10/remove-the-little-pessimizations.html|eliminating pessimisations>.
Switches on the functionality of the pragmatic modules L<strictures>, L<perl5i>, L<Moose>, Switches on the functionality of the pragmatic modules L<strictures>,
L<MooseX::Method::Signatures>, L<TryCatch>. L<TryCatch>.
=head1 INTERFACE =head1 INTERFACE
@ -63,9 +63,9 @@ See L<perlfunc/import>.
By passing an arrayref to C<-skip>, you can disable features: By passing an arrayref to C<-skip>, you can disable features:
use Sipwise::Base -skip => ['Moose']; # skip importing Moose use Sipwise::Base -skip => ['TryCatch']; # skip importing TryCatch
The features strings are C<perl5i>, C<Moose>, C<MooseX::Method::Signatures>, C<TryCatch>. The features strings are C<TryCatch>.
=head2 Exports =head2 Exports

@ -1,7 +0,0 @@
package MethodSignatures;
use Sipwise::Base;
use t::Types 'Place';
method greet(Place $who) {
return "Hello, $who!";
}

@ -1,5 +0,0 @@
package Types;
use Sipwise::Base;
use Moose::Util::TypeConstraints qw(subtype as where);
subtype 'Place', as 'Str', where { /world/ };

@ -1,11 +0,0 @@
use Sipwise::Base;
use Test::More import => [qw(done_testing ok)];
eval {
child {
exec $^X, '-e1';
};
};
ok !$@;
done_testing;

@ -25,23 +25,9 @@ eval {
}; };
ok !$@, 'switch syntax is available'; ok !$@, 'switch syntax is available';
ok(__PACKAGE__->can($_), "$_ function name is available")
for qw(after augment before extends has inner override super with method list);
eval 'use t::MethodSignatures';
try {
MethodSignatures->new->greet(123);
} catch($e) {
ok $e =~ /^Validation failed/;
}
ok MethodSignatures->new->greet('world') eq 'Hello, world!', 'method signatures';
eval { unlink '/tmp/doesnotexist' }; eval { unlink '/tmp/doesnotexist' };
ok $@, 'autodie is in effect'; ok $@, 'autodie is in effect';
ok 2->pow(8), 'autobox is in effect';
try { try {
die bless { fnord => 42 } => 'Foobar'; die bless { fnord => 42 } => 'Foobar';
} catch (Foobar $e) { } catch (Foobar $e) {

@ -1,7 +1,7 @@
use Sipwise::Base -skip => ['Moose']; use Sipwise::Base -skip => ['TryCatch'];
use Test::More import => [qw(done_testing ok)]; use Test::More import => [qw(done_testing ok)];
ok(!__PACKAGE__->can($_), "Moose $_ function name is not available") ok(!__PACKAGE__->can($_), "TryCatch $_ function name is not available")
for qw(after augment before extends has inner override super with); for qw(try catch);
done_testing; done_testing;

Loading…
Cancel
Save