Mercurial > repos > cpt > cpt_psm_prep
comparison lib/CPT/Report.pm @ 1:d724f34e671d draft default tip
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
author | cpt |
---|---|
date | Mon, 05 Jun 2023 02:50:07 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:e4de0a0e90c8 | 1:d724f34e671d |
---|---|
1 package CPT::Report; | |
2 use Moose::Role; | |
3 use strict; | |
4 use warnings; | |
5 use autodie; | |
6 | |
7 requires 'header'; | |
8 requires 'footer'; | |
9 requires 'h1'; | |
10 requires 'h2'; | |
11 requires 'h3'; | |
12 requires 'h4'; | |
13 requires 'h5'; | |
14 requires 'h6'; | |
15 requires 'p'; | |
16 requires 'list_start'; | |
17 requires 'list_end'; | |
18 requires 'list_element'; | |
19 | |
20 has 'title' => ( is => 'rw', isa => 'Str' ); | |
21 has 'date' => ( is => 'rw', isa => 'Str'); | |
22 has 'author' => ( is => 'rw', isa => 'Str' ); | |
23 # Core content that we build up. | |
24 has 'content' => ( is => 'rw', isa => 'Str', default => ""); | |
25 | |
26 # Internal | |
27 has '_list_type' => ( is => 'rw', isa => 'Str', default => 'bullet'); | |
28 | |
29 sub a{ | |
30 my ($self, $addition) = @_; | |
31 $self->content($self->content() . $addition); | |
32 } | |
33 | |
34 sub get_content{ | |
35 my ($self) = @_; | |
36 return $self->header() . $self->content() . $self->footer(); | |
37 } | |
38 | |
39 no Moose::Role; | |
40 1; | |
41 | |
42 __END__ | |
43 | |
44 =pod | |
45 | |
46 =encoding UTF-8 | |
47 | |
48 =head1 NAME | |
49 | |
50 CPT::Report | |
51 | |
52 =head1 VERSION | |
53 | |
54 version 1.99.4 | |
55 | |
56 =head1 AUTHOR | |
57 | |
58 Eric Rasche <rasche.eric@yandex.ru> | |
59 | |
60 =head1 COPYRIGHT AND LICENSE | |
61 | |
62 This software is Copyright (c) 2014 by Eric Rasche. | |
63 | |
64 This is free software, licensed under: | |
65 | |
66 The GNU General Public License, Version 3, June 2007 | |
67 | |
68 =cut |