summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes3
-rw-r--r--Makefile.PL21
-rw-r--r--README93
-rw-r--r--lib/MooseX/Privacy.pm18
-rw-r--r--lib/MooseX/Privacy/Meta/Attribute/Private.pm20
-rw-r--r--lib/MooseX/Privacy/Meta/Attribute/Protected.pm21
-rw-r--r--lib/MooseX/Privacy/Meta/Class.pm22
-rw-r--r--lib/MooseX/Privacy/Meta/Class/Role.pm21
-rw-r--r--lib/MooseX/Privacy/Meta/Method/Private.pm24
-rw-r--r--lib/MooseX/Privacy/Meta/Method/Protected.pm25
-rw-r--r--lib/MooseX/Privacy/Trait/Private.pm24
-rw-r--r--lib/MooseX/Privacy/Trait/Protected.pm25
-rw-r--r--lib/MooseX/Privacy/Trait/Role.pm22
-rw-r--r--xt/01_podspell.t10
-rw-r--r--xt/02_perlcritic.t8
-rw-r--r--xt/03_pod.t4
-rw-r--r--xt/perlcriticrc2
17 files changed, 9 insertions, 354 deletions
diff --git a/Changes b/Changes
index 21da643..7ae38e8 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,7 @@
Revision history for Perl extension MooseX::Privacy
+0.02 Sun 18 Jul 2010 03:06:19 PM CEST
+ - close RT #58330
+
0.01 Wed Feb 10 09:09:07 2010
- original version
diff --git a/Makefile.PL b/Makefile.PL
deleted file mode 100644
index f2bda4e..0000000
--- a/Makefile.PL
+++ /dev/null
@@ -1,21 +0,0 @@
-use inc::Module::Install;
-name 'MooseX-Privacy';
-all_from 'lib/MooseX/Privacy.pm';
-
-requires 'Moose';
-requires 'Scalar::Util';
-requires 'MooseX::Role::Parameterized';
-requires 'MooseX::Types';
-
-tests 't/*.t';
-author_tests 'xt';
-
-license 'perl';
-readme_from 'lib/MooseX/Privacy.pm';
-
-build_requires 'Test::More';
-use_test_base;
-auto_include;
-author_tests 'xt';
-auto_set_repository;
-WriteAll;
diff --git a/README b/README
deleted file mode 100644
index 8fa8c9a..0000000
--- a/README
+++ /dev/null
@@ -1,93 +0,0 @@
-NAME
- MooseX::Privacy - Provides the syntax to restrict/control visibility of
- your methods
-
-SYNOPSIS
- use MooseX::Privacy;
-
- has config => (
- is => 'rw',
- isa => 'Some::Config',
- traits => [qw/Private/],
- );
-
- has username => (
- is => 'rw',
- isa => 'Str',
- traits => [qw/Protected/],
- );
-
- private_method foo => sub {
- return 23;
- };
-
- protected_method bar => sub {
- return 42;
- };
-
-DESCRIPTION
- MooseX::Privacy brings the concept of private and protected methods to
- your class.
-
-METHODS
- Private
- When you declare a method as private, this method can be called only
- within the class.
-
- package Foo;
-
- use Moose;
- use MooseX::Privacy;
-
- private_method foo => sub { return 23 };
-
- sub mul_by_foo { my $self = shift; $self->foo * $_[0] }
-
- 1;
-
- my $foo = Foo->new;
- $foo->foo; # die
- $foo->mul_by_foo; # ok
-
- Protected
- When you declare a method as protected, this method can be called only
- within the class AND any of it's subclasses.
-
- package Foo;
-
- use Moose;
- use MooseX::Privacy;
-
- protected_method foo => sub { return 23 };
-
- package Bar;
-
- use Moose;
- extends Foo;
-
- sub bar { my $self = shift; $self->foo }
-
- 1;
-
- my $foo = Foo->new;
- $foo->foo; # die
- my $bar = Bar->new;
- $bar->bar; # ok
-
- Attributes
- Private
- When the Private traits is applied to an attribute, this attribute can
- only be read or set within the class.
-
- Protected
- When the Protected traits is applied to an attribute, this attribute can
- only be read or set within the class AND any of his subclasses.
-
-AUTHOR
- franck cuny <franck@lumberjaph.net>
-
-SEE ALSO
-LICENSE
- This library is free software; you can redistribute it and/or modify it
- under the same terms as Perl itself.
-
diff --git a/lib/MooseX/Privacy.pm b/lib/MooseX/Privacy.pm
index b41afc4..65270c8 100644
--- a/lib/MooseX/Privacy.pm
+++ b/lib/MooseX/Privacy.pm
@@ -1,5 +1,7 @@
package MooseX::Privacy;
+# ABSTRACT: Provides the syntax to restrict/control visibility of your methods
+
our $VERSION = '0.01';
use Moose::Exporter;
@@ -32,10 +34,6 @@ sub init_meta {
1;
__END__
-=head1 NAME
-
-MooseX::Privacy - Provides the syntax to restrict/control visibility of your methods
-
=head1 SYNOPSIS
use MooseX::Privacy;
@@ -121,15 +119,3 @@ When the B<Private> traits is applied to an attribute, this attribute can only b
When the B<Protected> traits is applied to an attribute, this attribute can only be read or set within the class AND any of his subclasses.
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
diff --git a/lib/MooseX/Privacy/Meta/Attribute/Private.pm b/lib/MooseX/Privacy/Meta/Attribute/Private.pm
index b3c7a35..cf63fd0 100644
--- a/lib/MooseX/Privacy/Meta/Attribute/Private.pm
+++ b/lib/MooseX/Privacy/Meta/Attribute/Private.pm
@@ -12,23 +12,3 @@ sub _check_private {
}
1;
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Meta::Attribute::Private
-
-=head1 SYNOPSIS
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
diff --git a/lib/MooseX/Privacy/Meta/Attribute/Protected.pm b/lib/MooseX/Privacy/Meta/Attribute/Protected.pm
index b0d57c5..d5ef6be 100644
--- a/lib/MooseX/Privacy/Meta/Attribute/Protected.pm
+++ b/lib/MooseX/Privacy/Meta/Attribute/Protected.pm
@@ -13,24 +13,3 @@ sub _check_protected {
}
1;
-
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Meta::Attribute::Protected
-
-=head1 SYNOPSIS
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
diff --git a/lib/MooseX/Privacy/Meta/Class.pm b/lib/MooseX/Privacy/Meta/Class.pm
index 554752c..b286a7e 100644
--- a/lib/MooseX/Privacy/Meta/Class.pm
+++ b/lib/MooseX/Privacy/Meta/Class.pm
@@ -1,5 +1,7 @@
package MooseX::Privacy::Meta::Class;
+#ABSTRACT: Meta Class for your privacy
+
use Moose::Role;
use Moose::Meta::Class;
@@ -18,14 +20,6 @@ sub register_implementation {'MooseX::Privacy::Trait::Protected'}
__END__
-=head1 NAME
-
-MooseXMooseX::Privacy::Meta::Class - Meta Class for your privacy
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
=head1 METHODS
=head2 local_private_attributes
@@ -86,15 +80,3 @@ or
)
);
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
diff --git a/lib/MooseX/Privacy/Meta/Class/Role.pm b/lib/MooseX/Privacy/Meta/Class/Role.pm
index 76d3ca4..5543939 100644
--- a/lib/MooseX/Privacy/Meta/Class/Role.pm
+++ b/lib/MooseX/Privacy/Meta/Class/Role.pm
@@ -1,5 +1,7 @@
package MooseX::Privacy::Meta::Class::Role;
+# ABSTRACT: Private and Protected parameterized roles
+
use MooseX::Role::Parameterized;
use Scalar::Util;
use Carp qw/confess/;
@@ -66,23 +68,4 @@ role {
};
1;
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Meta::Class::Role - Private and Protected parameterized roles
-
-=head1 SYNOPSIS
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-=cut
diff --git a/lib/MooseX/Privacy/Meta/Method/Private.pm b/lib/MooseX/Privacy/Meta/Method/Private.pm
index e706e67..a308863 100644
--- a/lib/MooseX/Privacy/Meta/Method/Private.pm
+++ b/lib/MooseX/Privacy/Meta/Method/Private.pm
@@ -24,27 +24,3 @@ sub wrap {
}
1;
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Meta::Method::Private
-
-=head1 SYNOPSIS
-
-=head1 METHODS
-
-=head2 wrap
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
diff --git a/lib/MooseX/Privacy/Meta/Method/Protected.pm b/lib/MooseX/Privacy/Meta/Method/Protected.pm
index f76ac8e..22e1481 100644
--- a/lib/MooseX/Privacy/Meta/Method/Protected.pm
+++ b/lib/MooseX/Privacy/Meta/Method/Protected.pm
@@ -26,28 +26,3 @@ sub wrap {
}
1;
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Meta::Method::Protected
-
-=head1 SYNOPSIS
-
-=head1 METHODS
-
-=head2 wrap
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
diff --git a/lib/MooseX/Privacy/Trait/Private.pm b/lib/MooseX/Privacy/Trait/Private.pm
index 7d16fd7..3f00add 100644
--- a/lib/MooseX/Privacy/Trait/Private.pm
+++ b/lib/MooseX/Privacy/Trait/Private.pm
@@ -4,27 +4,3 @@ use Moose::Role;
with 'MooseX::Privacy::Trait::Role' => {name => 'Private'};
1;
-
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Trait::Private;
-
-=head1 SYNOPSIS
-
-=head1 METHODS
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
diff --git a/lib/MooseX/Privacy/Trait/Protected.pm b/lib/MooseX/Privacy/Trait/Protected.pm
index 78d0f11..282e335 100644
--- a/lib/MooseX/Privacy/Trait/Protected.pm
+++ b/lib/MooseX/Privacy/Trait/Protected.pm
@@ -4,28 +4,3 @@ use Moose::Role;
with 'MooseX::Privacy::Trait::Role' => {name => 'Protected'};
1;
-
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Trait::Protected;
-
-=head1 SYNOPSIS
-
-=head1 METHODS
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
-
diff --git a/lib/MooseX/Privacy/Trait/Role.pm b/lib/MooseX/Privacy/Trait/Role.pm
index 62c4c91..d4e9c02 100644
--- a/lib/MooseX/Privacy/Trait/Role.pm
+++ b/lib/MooseX/Privacy/Trait/Role.pm
@@ -20,25 +20,3 @@ role {
};
1;
-__END__
-
-=head1 NAME
-
-MooseX::Privacy::Trait::Role
-
-=head1 SYNOPSIS
-
-=head1 METHODS
-
-=head1 AUTHOR
-
-franck cuny E<lt>franck@lumberjaph.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
diff --git a/xt/01_podspell.t b/xt/01_podspell.t
deleted file mode 100644
index 130eed1..0000000
--- a/xt/01_podspell.t
+++ /dev/null
@@ -1,10 +0,0 @@
-use Test::More;
-eval q{ use Test::Spelling };
-plan skip_all => "Test::Spelling is not installed." if $@;
-add_stopwords(map { split /[\s\:\-]/ } <DATA>);
-$ENV{LANG} = 'C';
-all_pod_files_spelling_ok('lib');
-__DATA__
-franck cuny
-franck.cuny@rtgi.fr
-MooseX::Privacy
diff --git a/xt/02_perlcritic.t b/xt/02_perlcritic.t
deleted file mode 100644
index b977df8..0000000
--- a/xt/02_perlcritic.t
+++ /dev/null
@@ -1,8 +0,0 @@
-use strict;
-use Test::More;
-eval {
- require Test::Perl::Critic;
- Test::Perl::Critic->import( -profile => 'xt/perlcriticrc');
-};
-plan skip_all => "Test::Perl::Critic is not installed." if $@;
-all_critic_ok('lib');
diff --git a/xt/03_pod.t b/xt/03_pod.t
deleted file mode 100644
index 437887a..0000000
--- a/xt/03_pod.t
+++ /dev/null
@@ -1,4 +0,0 @@
-use Test::More;
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-all_pod_files_ok();
diff --git a/xt/perlcriticrc b/xt/perlcriticrc
deleted file mode 100644
index fa96144..0000000
--- a/xt/perlcriticrc
+++ /dev/null
@@ -1,2 +0,0 @@
-[TestingAndDebugging::ProhibitNoStrict]
-allow=refs