From: Vincent Pit Date: Mon, 20 Dec 2010 23:23:38 +0000 (+0100) Subject: Switch to qw<> X-Git-Tag: rt87282~20 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=commitdiff_plain;h=65b895926935d98e3bd34b82a6e8b4e4e6b2f09c Switch to qw<> --- diff --git a/lib/LaTeX/TikZ/Formatter.pm b/lib/LaTeX/TikZ/Formatter.pm index 1acf9b8..77f3b53 100644 --- a/lib/LaTeX/TikZ/Formatter.pm +++ b/lib/LaTeX/TikZ/Formatter.pm @@ -45,7 +45,7 @@ Defaults to C. has 'unit' => ( is => 'ro', - isa => enum([ qw/cm pt/ ]), + isa => enum([ qw ]), default => 'cm', ); @@ -131,7 +131,7 @@ sub id { my $origin = $tikz->origin; if (defined $origin) { - my ($x, $y) = map $origin->$_, qw/x y/; + my ($x, $y) = map $origin->$_, qw; $origin = "($x;$y)"; } else { $origin = "(0;0)"; @@ -139,7 +139,7 @@ sub id { join $;, map { defined() ? "$_" : '(undef)'; - } map($tikz->$_, qw/unit format scale width height/), $origin; + } map($tikz->$_, qw), $origin; } =head2 C diff --git a/lib/LaTeX/TikZ/Functor/Rule.pm b/lib/LaTeX/TikZ/Functor/Rule.pm index d4e0700..4dbe979 100644 --- a/lib/LaTeX/TikZ/Functor/Rule.pm +++ b/lib/LaTeX/TikZ/Functor/Rule.pm @@ -25,7 +25,7 @@ A functor is basically an ordered collection of rules. use Carp (); use Any::Moose; -use Any::Moose 'Util' => [ qw[find_meta does_role] ]; +use Any::Moose 'Util' => [ qw ]; use Any::Moose 'Util::TypeConstraints'; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm b/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm index c31508b..72bb96f 100644 --- a/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm +++ b/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm @@ -85,7 +85,7 @@ Note that you will need L =cut -use Scalar::Util qw/blessed/; +use Scalar::Util qw; use Sub::Name (); diff --git a/lib/LaTeX/TikZ/Mod.pm b/lib/LaTeX/TikZ/Mod.pm index 8095e44..46c61f7 100644 --- a/lib/LaTeX/TikZ/Mod.pm +++ b/lib/LaTeX/TikZ/Mod.pm @@ -60,12 +60,12 @@ Returns the TikZ code that activates the current mod as a string formatted by th =cut -requires qw( +requires qw< tag covers declare apply -); +>; coerce 'LaTeX::TikZ::Mod' => from 'Str' diff --git a/lib/LaTeX/TikZ/Mod/Formatted.pm b/lib/LaTeX/TikZ/Mod/Formatted.pm index 7e7b109..2dd820b 100644 --- a/lib/LaTeX/TikZ/Mod/Formatted.pm +++ b/lib/LaTeX/TikZ/Mod/Formatted.pm @@ -18,7 +18,7 @@ our $VERSION = '0.02'; use Any::Moose; use Any::Moose 'Util::TypeConstraints' => [ 'enum', - qw(coerce from via), + qw, ]; =head1 ATTRIBUTES @@ -29,7 +29,7 @@ use Any::Moose 'Util::TypeConstraints' => [ has 'type' => ( is => 'ro', - isa => enum([ qw/clip layer raw/ ]), + isa => enum([ qw ]), required => 1, ); diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm index ccb171d..7e15b5f 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm @@ -84,7 +84,7 @@ around 'BUILDARGS' => sub { confess('Can\'t specify an explicit template for a '. __PACKAGE__ .' pattern') if exists $args{template}; - my @params = qw/dot_width space_width/; + my @params = qw; my $meta = $class->meta; for (@params) { diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm b/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm index c9978e0..193b68e 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm @@ -125,7 +125,7 @@ around 'BUILDARGS' => sub { confess('Can\'t specify an explicit template for a '. __PACKAGE__ .' pattern') if exists $args{template}; - my @params = qw/direction line_width space_width/; + my @params = qw; my $meta = $class->meta; for (@params) { diff --git a/lib/LaTeX/TikZ/Point.pm b/lib/LaTeX/TikZ/Point.pm index e409947..d5c5da0 100644 --- a/lib/LaTeX/TikZ/Point.pm +++ b/lib/LaTeX/TikZ/Point.pm @@ -16,13 +16,13 @@ Version 0.02 our $VERSION = '0.02'; use Any::Moose; -use Any::Moose 'Util::TypeConstraints' => [ qw/ +use Any::Moose 'Util::TypeConstraints' => [ qw< coerce from via find_type_constraint register_type_constraint -/ ]; +> ]; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Point/Math/Complex.pm b/lib/LaTeX/TikZ/Point/Math/Complex.pm index c5c94b7..56ba905 100644 --- a/lib/LaTeX/TikZ/Point/Math/Complex.pm +++ b/lib/LaTeX/TikZ/Point/Math/Complex.pm @@ -19,12 +19,12 @@ use Math::Complex; use LaTeX::TikZ::Point; -use Any::Moose 'Util::TypeConstraints' => [ qw/ +use Any::Moose 'Util::TypeConstraints' => [ qw< class_type coerce from via -/ ]; +> ]; my $mc_tc = class_type 'Math::Complex'; diff --git a/lib/LaTeX/TikZ/Set.pm b/lib/LaTeX/TikZ/Set.pm index cf2386d..4e6eafc 100644 --- a/lib/LaTeX/TikZ/Set.pm +++ b/lib/LaTeX/TikZ/Set.pm @@ -57,9 +57,9 @@ Returns an array reference of TikZ code lines required to effectively draw the c =cut -requires qw( +requires qw< draw -); +>; =head2 C diff --git a/lib/LaTeX/TikZ/Set/Line.pm b/lib/LaTeX/TikZ/Set/Line.pm index 807b56d..3ee9694 100644 --- a/lib/LaTeX/TikZ/Set/Line.pm +++ b/lib/LaTeX/TikZ/Set/Line.pm @@ -81,7 +81,7 @@ LaTeX::TikZ::Interface->register( LaTeX::TikZ::Functor->default_rule( (__PACKAGE__) => sub { my ($functor, $set, @args) = @_; - $set->new(map { $_ => $set->$_->$functor(@args) } qw/from to/) + $set->new(map { $_ => $set->$_->$functor(@args) } qw) } ); diff --git a/lib/LaTeX/TikZ/Set/Mutable.pm b/lib/LaTeX/TikZ/Set/Mutable.pm index 8481fb8..e7518cd 100644 --- a/lib/LaTeX/TikZ/Set/Mutable.pm +++ b/lib/LaTeX/TikZ/Set/Mutable.pm @@ -36,9 +36,9 @@ C =cut -requires qw( +requires qw< add -); +>; =head1 SEE ALSO diff --git a/lib/LaTeX/TikZ/Set/Op.pm b/lib/LaTeX/TikZ/Set/Op.pm index 6d93d02..69d8a63 100644 --- a/lib/LaTeX/TikZ/Set/Op.pm +++ b/lib/LaTeX/TikZ/Set/Op.pm @@ -49,9 +49,9 @@ Returns the TikZ code that builds a path out of the current set object as a stri =cut -requires qw( +requires qw< path -); +>; =head2 C diff --git a/lib/LaTeX/TikZ/Set/Path.pm b/lib/LaTeX/TikZ/Set/Path.pm index 8cd762c..a19d8c0 100644 --- a/lib/LaTeX/TikZ/Set/Path.pm +++ b/lib/LaTeX/TikZ/Set/Path.pm @@ -28,10 +28,10 @@ This class consumes the L and L =cut -with qw( +with qw< LaTeX::TikZ::Set::Op LaTeX::TikZ::Set::Mutable -); +>; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Set/Point.pm b/lib/LaTeX/TikZ/Set/Point.pm index ff861b0..2309db3 100644 --- a/lib/LaTeX/TikZ/Set/Point.pm +++ b/lib/LaTeX/TikZ/Set/Point.pm @@ -44,7 +44,7 @@ has 'point' => ( isa => 'LaTeX::TikZ::Point::Autocoerce', required => 1, coerce => 1, - handles => [ qw/x y/ ], + handles => [ qw ], ); =head2 C