X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FMod%2FLayer.pm;h=1b915b98f4ee107a88c3638bed7ac96440da9a0c;hb=4f696c03a66ef6b52ee7b9b3c74a71d5abc64f7e;hp=0dd0a84a76dec2a4b0f06a9c470d9ca253a31de3;hpb=af7d6a5aef3bf5fec0c187b3a13a14adc88251fd;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Mod/Layer.pm b/lib/LaTeX/TikZ/Mod/Layer.pm index 0dd0a84..1b915b9 100644 --- a/lib/LaTeX/TikZ/Mod/Layer.pm +++ b/lib/LaTeX/TikZ/Mod/Layer.pm @@ -9,11 +9,11 @@ LaTeX::TikZ::Mod::Layer - A modifier that specifies a drawing layer. =head1 VERSION -Version 0.01 +Version 0.03 =cut -our $VERSION = '0.01'; +our $VERSION = '0.03'; use Scalar::Util (); use List::Util (); @@ -22,17 +22,33 @@ use LaTeX::TikZ::Mod::Formatted; use LaTeX::TikZ::Interface; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; + +=head1 RELATIONSHIPS + +This class consumes the L role, and as such implements the L, L, L and L methods. + +=cut with 'LaTeX::TikZ::Mod'; +=head1 ATTRIBUTES + +=head2 C + +=cut + has 'name' => ( is => 'ro', isa => 'Str', required => 1, ); +=head2 C + +=cut + subtype 'LaTeX::TikZ::Mod::LevelList' => as 'ArrayRef[LaTeX::TikZ::Mod::Layer]'; @@ -54,6 +70,10 @@ has '_above' => ( sub above { @{$_[0]->_above} } +=head2 C + +=cut + has '_below' => ( is => 'ro', isa => 'LaTeX::TikZ::Mod::LevelList', @@ -72,6 +92,10 @@ has '_score' => ( builder => '_build_score', ); +=head1 METHODS + +=cut + my %layers; around 'new' => sub { @@ -105,13 +129,25 @@ sub DEMOLISH { delete $layers{$self->name}; } +=head2 C + +=cut + sub tag { my ($self) = @_; ref($self) . '/' . $self->name; } -sub cover { $_[0]->name eq $_[1]->name } +=head2 C + +=cut + +sub covers { $_[0]->name eq $_[1]->name } + +=head2 C + +=cut { our %score; @@ -162,6 +198,10 @@ sub cover { $_[0]->name eq $_[1]->name } $score{$name} } +=head2 C + +=cut + sub declare { shift; @@ -186,6 +226,10 @@ sub cover { $_[0]->name eq $_[1]->name } } } +=head2 C + +=cut + sub apply { my ($self) = @_; @@ -208,6 +252,10 @@ __PACKAGE__->meta->make_immutable( inline_constructor => 0, ); +=head1 SEE ALSO + +L, L. + =head1 AUTHOR Vincent Pit, C<< >>, L. @@ -227,7 +275,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2010 Vincent Pit, all rights reserved. +Copyright 2010,2011,2012,2013,2014,2015 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.