has 'unit' => (
is => 'ro',
- isa => enum([ qw/cm pt/ ]),
+ isa => enum([ qw<cm pt> ]),
default => 'cm',
);
my $origin = $tikz->origin;
if (defined $origin) {
- my ($x, $y) = map $origin->$_, qw/x y/;
+ my ($x, $y) = map $origin->$_, qw<x y>;
$origin = "($x;$y)";
} else {
$origin = "(0;0)";
join $;, map {
defined() ? "$_" : '(undef)';
- } map($tikz->$_, qw/unit format scale width height/), $origin;
+ } map($tikz->$_, qw<unit format scale width height>), $origin;
}
=head2 C<render @sets>
use Carp ();
use Any::Moose;
-use Any::Moose 'Util' => [ qw[find_meta does_role] ];
+use Any::Moose 'Util' => [ qw<find_meta does_role> ];
use Any::Moose 'Util::TypeConstraints';
=head1 ATTRIBUTES
=cut
-use Scalar::Util qw/blessed/;
+use Scalar::Util qw<blessed>;
use Sub::Name ();
=cut
-requires qw(
+requires qw<
tag
covers
declare
apply
-);
+>;
coerce 'LaTeX::TikZ::Mod'
=> from 'Str'
use Any::Moose;
use Any::Moose 'Util::TypeConstraints' => [
'enum',
- qw(coerce from via),
+ qw<coerce from via>,
];
=head1 ATTRIBUTES
has 'type' => (
is => 'ro',
- isa => enum([ qw/clip layer raw/ ]),
+ isa => enum([ qw<clip layer raw> ]),
required => 1,
);
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<dot_width space_width>;
my $meta = $class->meta;
for (@params) {
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<direction line_width space_width>;
my $meta = $class->meta;
for (@params) {
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
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';
=cut
-requires qw(
+requires qw<
draw
-);
+>;
=head2 C<mod @mods>
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<from to>)
}
);
=cut
-requires qw(
+requires qw<
add
-);
+>;
=head1 SEE ALSO
=cut
-requires qw(
+requires qw<
path
-);
+>;
=head2 C<draw>
=cut
-with qw(
+with qw<
LaTeX::TikZ::Set::Op
LaTeX::TikZ::Set::Mutable
-);
+>;
=head1 ATTRIBUTES
isa => 'LaTeX::TikZ::Point::Autocoerce',
required => 1,
coerce => 1,
- handles => [ qw/x y/ ],
+ handles => [ qw<x y> ],
);
=head2 C<label>
MSG
$args{from} = $tc1->coerce($args{from});
$meta->find_attribute_by_name($_)->type_constraint->assert_valid($args{$_})
- for qw/from width height/;
+ for qw<from width height>;
my $p = $args{from}->point;
$args{to} = LaTeX::TikZ::Point->new(
x => $p->x + $args{width},
__PACKAGE__->new(
from => $p,
- ($is_relative ? (map +($_ => $q->{$_}), qw/width height/) : (to => $q)),
+ ($is_relative ? (map +($_ => $q->{$_}), qw<width height>) : (to => $q)),
);
},
);
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<from to>)
}
);
use Any::Moose;
use Any::Moose 'Util::TypeConstraints'
- => [ qw/subtype as where find_type_constraint/ ];
+ => [ qw<subtype as where find_type_constraint> ];
=head1 RELATIONSHIPS
=cut
-with qw(
+with qw<
LaTeX::TikZ::Set
LaTeX::TikZ::Set::Mutable
-);
+>;
subtype 'LaTeX::TikZ::Set::Sequence::Elements'
=> as 'Object'
::is(prototype('T'), '', 'LaTeX::TikZ::TestAPI2::T is actually a constant');
}
-my @methods = qw/
+my @methods = qw<
formatter functor
raw
path seq
raw_mod
clip layer
width color fill pattern
-/;
+>;
for (@methods) {
ok(Tikz->can($_), "Tikz evaluates to something that ->can($_)");
package LaTeX::TikZ::TestX;
use Any::Moose;
- use Any::Moose 'Util::TypeConstraints' => [ qw/
+ use Any::Moose 'Util::TypeConstraints' => [ qw<
coerce
from
via
find_type_constraint
register_type_constraint
- / ];
+ > ];
has 'id' => (
is => 'ro',
like $@, qr/at least two LaTeX::TikZ::Set::Point objects are needed in order to build a polyline/, "creating a $desc from only one Tikz point croaks";
$pl = eval {
- Tikz->$polyline(qw/foo bar/);
+ Tikz->$polyline(qw<foo bar>);
};
like $@, failed_valid('LaTeX::TikZ::Point::Autocoerce'), "creating a $desc from two string croaks";
}
RES
eval {
- $baz->mod(Tikz->raw_mod($_)) for qw/raw2 raw3/;
+ $baz->mod(Tikz->raw_mod($_)) for qw<raw2 raw3>;
};
is $@, '', 'creating and adding another raw mod doesn\'t croak';
RES
my ($fred, $fblue) = eval {
- map Tikz->fill($_), qw/red blue/;
+ map Tikz->fill($_), qw<red blue>;
};
is $@, '', 'creating two fill mods doesn\'t croak';
my $seq = Tikz->seq($foo, $bar);
check_layers $seq, 'a sequence of two layered raw sets',
- <<'RES', [ qw/middle top/ ];
+ <<'RES', [ qw<middle top> ];
\begin{pgfonlayer}{middle}
\draw foo ;
\end{pgfonlayer}
is $@, '', 'calling an empty ->layer onto a sequence doesn\'t croak';
is "$res", "$seq", 'empty ->layer returns the object itself';
-check_layers $seq, 'a layered sequence', <<'RES', [ qw/bottom middle top/ ];
+check_layers $seq, 'a layered sequence', <<'RES', [ qw<bottom middle top> ];
\begin{pgfonlayer}{bottom}
\begin{pgfonlayer}{middle}
\draw foo ;
$seq->mod($red);
check_layers $seq, 'mods folding with layers 1',
- <<'RES', [ qw/bottom middle top/ ];
+ <<'RES', [ qw<bottom middle top> ];
\begin{pgfonlayer}{bottom}
\begin{scope} [color=red]
\begin{pgfonlayer}{middle}
$baz->mod($top);
check_layers $seq, 'mods folding with layers 2',
- <<'RES', [ qw/bottom middle top/ ];
+ <<'RES', [ qw<bottom middle top> ];
\begin{pgfonlayer}{bottom}
\begin{scope} [color=red]
\begin{pgfonlayer}{middle}
my $seq2 = Tikz->seq($bar, $baz, $foo)
->mod($red);
-check_layers $seq2, 'mods folding with layers 3', <<'RES', [ qw/middle top/ ];
+check_layers $seq2, 'mods folding with layers 3', <<'RES', [ qw<middle top> ];
\begin{scope} [color=red]
\begin{pgfonlayer}{top}
\begin{scope} [color=red]
my $seq3 = Tikz->seq($seq2, $bar)
->mod($red);
-check_layers $seq3, 'mods folding with layers 5', <<'RES', [ qw/middle top/ ];
+check_layers $seq3, 'mods folding with layers 5', <<'RES', [ qw<middle top> ];
\begin{scope} [color=red]
\draw qux ;
\begin{pgfonlayer}{middle}
$seq3 = Tikz->seq($bar, $seq2)
->mod($red);
-check_layers $seq3, 'mods folding with layers 6', <<'RES', [ qw/middle top/ ];
+check_layers $seq3, 'mods folding with layers 6', <<'RES', [ qw<middle top> ];
\begin{scope} [color=red]
\begin{pgfonlayer}{top}
\draw [color=red] bar ;