]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blob - lib/LaTeX/TikZ/Mod/Formatted.pm
Silence a warnings with Moose 1.09
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Mod / Formatted.pm
1 package LaTeX::TikZ::Mod::Formatted;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 LaTeX::TikZ::Mod::Formatted - Intermediate object between a modifier object and its code representation.
9
10 =head1 VERSION
11
12 Version 0.01
13
14 =cut
15
16 our $VERSION = '0.01';
17
18 use Any::Moose;
19 use Any::Moose 'Util::TypeConstraints' => [
20  'enum',
21  qw(coerce from via),
22 ];
23
24 =head1 ATTRIBUTES
25
26 =head2 C<type>
27
28 =cut
29
30 has 'type' => (
31  is       => 'ro',
32  isa      => enum([ qw/clip layer raw/ ]),
33  required => 1,
34 );
35
36 =head2 C<content>
37
38 =cut
39
40 has 'content' => (
41  is       => 'ro',
42  isa      => 'Str',
43  required => 1,
44 );
45
46 coerce 'LaTeX::TikZ::Mod::Formatted'
47     => from 'Str'
48     => via { LaTeX::TikZ::Mod::Formatted->new(type => 'raw', content => $_) };
49
50 =head1 METHODS
51
52 =head2 C<tag>
53
54 =cut
55
56 sub tag {
57  my ($self) = @_;
58
59  ref($self) . '/' . $self->type . '/' . $self->content;
60 }
61
62 __PACKAGE__->meta->make_immutable;
63
64 =head1 SEE ALSO
65
66 L<LaTeX::TikZ>.
67
68 =head1 AUTHOR
69
70 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
71
72 You can contact me by mail or on C<irc.perl.org> (vincent).
73
74 =head1 BUGS
75
76 Please report any bugs or feature requests to C<bug-latex-tikz at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LaTeX-TikZ>.
77 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
78
79 =head1 SUPPORT
80
81 You can find documentation for this module with the perldoc command.
82
83     perldoc LaTeX::TikZ
84
85 =head1 COPYRIGHT & LICENSE
86
87 Copyright 2010 Vincent Pit, all rights reserved.
88
89 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
90
91 =cut
92
93 1; # End of LaTeX::TikZ::Mod::Formatted