=head1 VERSION
-Version 0.01
+Version 0.02
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
use Sub::Name ();
use Any::Moose;
+=head1 ATTRIBUTES
+
+=head2 C<mods>
+
+=cut
+
has '_mods' => (
is => 'ro',
isa => 'Maybe[ArrayRef[LaTeX::TikZ::Mod::Formatted]]',
default => sub { +{ } },
);
+=head2 C<body>
+
+=cut
+
has '_body' => (
is => 'rw',
isa => 'LaTeX::TikZ::Scope|ArrayRef[Str]',
my $_body_tc = __PACKAGE__->meta->find_attribute_by_name('_body')
->type_constraint;
+=head1 METHODS
+
+=head2 C<mod>
+
+=cut
+
sub mod {
my $scope = shift;
$scope;
}
+=head2 C<body>
+
+=cut
+
sub body {
my $scope = shift;
'@{}' => 'dereference',
);
+=head2 C<flatten>
+
+=cut
+
sub flatten {
my ($scope) = @_;
return \@left, \@common, \@right;
});
+=head2 C<instantiate>
+
+=cut
+
sub instantiate {
my ($scope) = @_;
return @body;
}
+=head2 C<dereference>
+
+=cut
+
sub dereference { [ $_[0]->instantiate ] }
+=head2 C<fold>
+
+=cut
+
sub fold {
my ($left, $right, $rev) = @_;
);
my $has_different_layers;
- for (@$only_left) {
+ for (@$only_left, @$only_right) {
if ($_->type eq 'layer') {
$has_different_layers = 1;
last;
}
}
- unless ($has_different_layers) {
- for (@$only_right) {
- if ($_->type eq 'layer') {
- $has_different_layers = 1;
- last;
- }
- }
- }
if (!$has_different_layers and @$common) {
my $x = $left->new
__PACKAGE__->meta->make_immutable;
+=head1 SEE ALSO
+
+L<LaTeX::TikZ>.
+
=head1 AUTHOR
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.