[libmoosex-has-sugar-perl] 117/120: Style/Critic
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:16 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag 0.05070422-source
in repository libmoosex-has-sugar-perl.
commit 008893f05d052b6483e127e5ea581982a2fb582b
Author: Kent Fredric <kentfredric at gmail.com>
Date: Wed Nov 20 20:49:46 2013 +1300
Style/Critic
---
README.mkdn | 32 ++++++++++----------
lib/MooseX/Has/Sugar.pm | 32 ++++++++++----------
lib/MooseX/Has/Sugar/Minimal.pm | 10 +++----
lib/MooseX/Has/Sugar/Saccharin.pm | 62 +++++++++++++++++++--------------------
perlcritic.rc | 2 +-
5 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/README.mkdn b/README.mkdn
index 0d0c0e0..dc6f29c 100644
--- a/README.mkdn
+++ b/README.mkdn
@@ -120,15 +120,15 @@ Or even
# EXPORT GROUPS
-## :default
+## `:default`
-Since 0.0300, this exports all our syntax, the same as `:attrs :isattrs`.
+Since 0.0300, this exports all our syntax, the same as `:attrs` `:isattrs`.
Primarily because I found you generally want all the sugar, not just part of it.
This also gets rid of that nasty exclusion logic.
-## :isattrs
+## `:isattrs`
-This exports `ro`, `rw` and `bare` as lists, so they behave as stand-alone attrs like
+This exports `ro`, `rw` and `bare` as lists, so they behave as stand-alone attributes like
["lazy"](#lazy) does.
has foo => (
@@ -139,7 +139,7 @@ This exports `ro`, `rw` and `bare` as lists, so they behave as stand-alone attrs
__NOTE: This option is incompatible with [::Sugar::Minimal](https://metacpan.org/pod/MooseX::Has::Sugar::Minimal)__ : ["CONFLICTS"](#CONFLICTS)
-## :attrs
+## `:attrs`
This exports ["lazy"](#lazy) , ["lazy_build"](#lazy_build) and ["required"](#required), ["coerce"](#coerce), ["weak_ref"](#weak_ref)
and ["auto_deref"](#auto_deref) as subs that assume positive.
@@ -151,11 +151,11 @@ and ["auto_deref"](#auto_deref) as subs that assume positive.
__NOTE: This option is incompatible with [MooseX::Types](https://metacpan.org/pod/MooseX::Types) and [Moose's Type Constraints Module](https://metacpan.org/pod/Moose::Util::TypeConstraints)__ : ["CONFLICTS"](#CONFLICTS)
-## :is
+## `:is`
__DEPRECATED__. See [::Sugar::Minimal](https://metacpan.org/pod/MooseX::Has::Sugar::Minimal) for the same functionality
-## :allattrs
+## `:allattrs`
__DEPRECATED__, just use [":default"](#:default) or do
@@ -163,41 +163,41 @@ __DEPRECATED__, just use [":default"](#:default) or do
# EXPORTED FUNCTIONS
-## bare
+## `bare`
returns `('is','bare')`
-## ro
+## `ro`
returns `('is','ro')`
-## rw
+## `rw`
returns `('is','rw')`
-## required
+## `required`
returns `('required',1)`
-## lazy
+## `lazy`
returns `('lazy',1)`
-## lazy\_build
+## `lazy_build`
returns `('lazy_build',1)`
-## weak\_ref
+## `weak_ref`
returns `('weak_ref',1)`
-## coerce
+## `coerce`
returns `('coerce',1)`
__WARNING:__ Conflict with [MooseX::Types](https://metacpan.org/pod/MooseX::Types) and [Moose::Util::TypeConstraints](https://metacpan.org/pod/Moose::Util::TypeConstraints), see ["CONFLICTS"](#CONFLICTS).
-## auto\_deref
+## `auto_deref`
returns `('auto_deref',1)`
diff --git a/lib/MooseX/Has/Sugar.pm b/lib/MooseX/Has/Sugar.pm
index 52ee869..3edca09 100644
--- a/lib/MooseX/Has/Sugar.pm
+++ b/lib/MooseX/Has/Sugar.pm
@@ -122,15 +122,15 @@ Or even
use Carp ();
use Sub::Exporter ();
-=export_group :default
+=export_group C<:default>
-Since 0.0300, this exports all our syntax, the same as C<:attrs :isattrs>.
+Since 0.0300, this exports all our syntax, the same as C<:attrs> C<:isattrs>.
Primarily because I found you generally want all the sugar, not just part of it.
This also gets rid of that nasty exclusion logic.
-=export_group :isattrs
+=export_group C<:isattrs>
-This exports C<ro>, C<rw> and C<bare> as lists, so they behave as stand-alone attrs like
+This exports C<ro>, C<rw> and C<bare> as lists, so they behave as stand-alone attributes like
L</lazy> does.
has foo => (
@@ -141,7 +141,7 @@ L</lazy> does.
B<NOTE: This option is incompatible with L<::Sugar::Minimal|MooseX::Has::Sugar::Minimal>> : L</CONFLICTS>
-=export_group :attrs
+=export_group C<:attrs>
This exports L</lazy> , L</lazy_build> and L</required>, L</coerce>, L</weak_ref>
and L</auto_deref> as subs that assume positive.
@@ -153,11 +153,11 @@ and L</auto_deref> as subs that assume positive.
B<NOTE: This option is incompatible with L<MooseX::Types|MooseX::Types> and L<Moose's Type Constraints Module|Moose::Util::TypeConstraints>> : L</CONFLICTS>
-=export_group :is
+=export_group C<:is>
B<DEPRECATED>. See L<::Sugar::Minimal|MooseX::Has::Sugar::Minimal> for the same functionality
-=export_group :allattrs
+=export_group C<:allattrs>
B<DEPRECATED>, just use L</:default> or do
@@ -190,7 +190,7 @@ sub import {
goto &MooseX::Has::Sugar::do_import;
}
-=export_function bare
+=export_function C<bare>
returns C<('is','bare')>
@@ -200,7 +200,7 @@ sub bare() {
return ( 'is', 'bare' );
}
-=export_function ro
+=export_function C<ro>
returns C<('is','ro')>
@@ -210,7 +210,7 @@ sub ro() {
return ( 'is', 'ro' );
}
-=export_function rw
+=export_function C<rw>
returns C<('is','rw')>
@@ -220,7 +220,7 @@ sub rw() {
return ( 'is', 'rw' );
}
-=export_function required
+=export_function C<required>
returns C<('required',1)>
@@ -230,7 +230,7 @@ sub required() {
return ( 'required', 1 );
}
-=export_function lazy
+=export_function C<lazy>
returns C<('lazy',1)>
@@ -240,7 +240,7 @@ sub lazy() {
return ( 'lazy', 1 );
}
-=export_function lazy_build
+=export_function C<lazy_build>
returns C<('lazy_build',1)>
@@ -250,7 +250,7 @@ sub lazy_build() {
return ( 'lazy_build', 1 );
}
-=export_function weak_ref
+=export_function C<weak_ref>
returns C<('weak_ref',1)>
@@ -260,7 +260,7 @@ sub weak_ref() {
return ( 'weak_ref', 1 );
}
-=export_function coerce
+=export_function C<coerce>
returns C<('coerce',1)>
@@ -272,7 +272,7 @@ sub coerce() {
return ( 'coerce', 1 );
}
-=export_function auto_deref
+=export_function C<auto_deref>
returns C<('auto_deref',1)>
diff --git a/lib/MooseX/Has/Sugar/Minimal.pm b/lib/MooseX/Has/Sugar/Minimal.pm
index f59635e..0e8380a 100644
--- a/lib/MooseX/Has/Sugar/Minimal.pm
+++ b/lib/MooseX/Has/Sugar/Minimal.pm
@@ -30,11 +30,11 @@ All functions are exported by L<The Sub::Exporter Module|Sub::Exporter>.
=cut
-=export_group :default
+=export_group C<:default>
Exports L</:is>
-=export_group :is
+=export_group C<:is>
Exports L</bare>, L</ro>, L</rw>
@@ -50,7 +50,7 @@ Sub::Exporter::setup_exporter(
}
);
-=export_function bare
+=export_function C<bare>
returns C<('bare')>
@@ -60,7 +60,7 @@ sub bare() {
return ('bare');
}
-=export_function ro
+=export_function C<ro>
returns C<('ro')>
@@ -70,7 +70,7 @@ sub ro() {
return ('ro');
}
-=export_function rw
+=export_function C<rw>
returns C<('rw')>
diff --git a/lib/MooseX/Has/Sugar/Saccharin.pm b/lib/MooseX/Has/Sugar/Saccharin.pm
index 2673c02..6fe4584 100644
--- a/lib/MooseX/Has/Sugar/Saccharin.pm
+++ b/lib/MooseX/Has/Sugar/Saccharin.pm
@@ -21,7 +21,7 @@ Your choice.
use Carp ();
use Sub::Exporter ();
-=export_group :default
+=export_group C<:default>
exports L</ro>, L</rw>, L</required>, L</lazy>, L</lazy_build>, L</coerce>, L</weak_ref>, L</auto_deref>,
L</bare>, L</default>, L</init_arg>, L</predicate>, L</clearer>, L</builder>, L</trigger>,
@@ -38,9 +38,9 @@ Sub::Exporter::setup_exporter(
}
);
-=export_function bare
+=export_function C<bare>
-=export_function bare $Type
+=export_function C<bare> C<$Type>
bare Str
@@ -54,9 +54,9 @@ sub bare($) {
return ( 'is', 'bare', 'isa', shift, );
}
-=export_function ro
+=export_function C<ro>
-=export_function ro $Type
+=export_function C<ro> C<$Type>
ro Str
@@ -70,9 +70,9 @@ sub ro($) {
return ( 'is', 'ro', 'isa', shift, );
}
-=export_function rw
+=export_function C<rw>
-=export_function rw $Type
+=export_function C<rw> C<$Type>
rw Str
@@ -86,9 +86,9 @@ sub rw($) {
return ( 'is', 'rw', 'isa', shift, );
}
-=export_function required
+=export_function C<required>
-=export_function required @rest
+=export_function C<required @rest>
this
@@ -113,9 +113,9 @@ sub required(@) {
return ( 'required', 1, @_ );
}
-=export_function lazy
+=export_function C<lazy>
-=export_function lazy @rest
+=export_function C<lazy @rest>
like C<< ( lazy => 1 , @rest ) >>
@@ -125,9 +125,9 @@ sub lazy(@) {
return ( 'lazy', 1, @_ );
}
-=export_function lazy_build
+=export_function C<lazy_build>
-=export_function lazy_build @rest
+=export_function C<lazy_build @rest>
like C<< ( lazy_build => 1, @rest ) >>
@@ -137,9 +137,9 @@ sub lazy_build(@) {
return ( 'lazy_build', 1, @_ );
}
-=export_function weak_ref
+=export_function C<weak_ref>
-=export_function weak_ref @rest
+=export_function C<weak_ref @rest>
like C<< ( weak_ref => 1, @rest ) >>
@@ -149,9 +149,9 @@ sub weak_ref(@) {
return ( 'weak_ref', 1, @_ );
}
-=export_function coerce
+=export_function C<coerce>
-=export_function @rest
+=export_function C<coerce @rest>
like C<< ( coerce => 1, @rest ) >>
@@ -165,9 +165,9 @@ sub coerce(@) {
return ( 'coerce', 1, @_ );
}
-=export_function auto_deref
+=export_function C<auto_deref>
-=export_function auto_deref @rest
+=export_function C<auto_deref @rest>
like C<< ( auto_deref => 1, @rest ) >>
@@ -177,9 +177,9 @@ sub auto_deref(@) {
return ( 'auto_deref', 1, @_ );
}
-=export_function builder
+=export_function C<builder>
-=export_function builder $buildername:
+=export_function C<builder $buildername>
required rw Str, builder '_build_foo'
@@ -193,9 +193,9 @@ sub builder($) {
return ( 'builder', shift );
}
-=export_function predicate
+=export_function C<predicate>
-=export_function predicate $predicatename
+=export_function C<predicate $predicatename>
see L</builder>
@@ -205,9 +205,9 @@ sub predicate($) {
return ( 'predicate', shift );
}
-=export_function clearer
+=export_function C<clearer>
-=export_function clearer $clearername
+=export_function C<clearer $clearername>
see L</builder>
@@ -217,9 +217,9 @@ sub clearer($) {
return ( 'clearer', shift );
}
-=export_function init_arg
+=export_function C<init_arg>
-=export_function init_arg $argname
+=export_function C<init_arg $argname>
see L</builder>
@@ -229,9 +229,9 @@ sub init_arg($) {
return ( 'init_arg', shift );
}
-=export_function default
+=export_function C<default>
-=export_function default { $code }
+=export_function C<default { $code }>
Examples:
@@ -257,9 +257,9 @@ sub default(&) {
);
}
-=export_function trigger
+=export_function C<trigger>
-=export_function trigger { $code }
+=export_function C<trigger { $code }>
Works exactly like default.
diff --git a/perlcritic.rc b/perlcritic.rc
index 09f9cf3..5840ede 100644
--- a/perlcritic.rc
+++ b/perlcritic.rc
@@ -10,7 +10,7 @@ allow_includes = 1
[CodeLayout::ProhibitTrailingWhitespace]
[Documentation::PodSpelling]
-stop_words = attrs ro rw
+stop_words = localised
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build_)\w
--
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