]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blob - lib/LaTeX/TikZ/Mod/Formatted.pm
Initial commit
[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
21 has 'type' => (
22  is       => 'ro',
23  isa      => enum([ qw/clip layer raw/ ]),
24  required => 1,
25 );
26
27 has 'content' => (
28  is       => 'ro',
29  isa      => 'Str',
30  required => 1,
31 );
32
33 coerce 'LaTeX::TikZ::Mod::Formatted'
34     => from 'Str'
35     => via { LaTeX::TikZ::Mod::Formatted->new(type => 'raw', content => $_) };
36
37 sub tag {
38  my ($self) = @_;
39
40  ref($self) . '/' . $self->type . '/' . $self->content;
41 }
42
43 __PACKAGE__->meta->make_immutable;
44
45 =head1 AUTHOR
46
47 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
48
49 You can contact me by mail or on C<irc.perl.org> (vincent).
50
51 =head1 BUGS
52
53 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>.
54 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
55
56 =head1 SUPPORT
57
58 You can find documentation for this module with the perldoc command.
59
60     perldoc LaTeX::TikZ
61
62 =head1 COPYRIGHT & LICENSE
63
64 Copyright 2010 Vincent Pit, all rights reserved.
65
66 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
67
68 =cut
69
70 1; # End of LaTeX::TikZ::Mod::Formatted