6 use Test::More tests => 2;
14 package Document::Page;
17 has 'body' => (is => 'rw', isa => 'Str', default => sub {''});
27 my ($self, $appendage) = @_;
28 $self->body($self->body . $appendage);
31 sub open_page { (shift)->append_body('<page>') }
32 sub close_page { (shift)->append_body('</page>') }
34 package Document::PageWithHeadersAndFooters;
37 extends 'Document::Page';
39 augment 'create' => sub {
46 sub create_header { (shift)->append_body('<header/>') }
47 sub create_footer { (shift)->append_body('<footer/>') }
52 extends 'Document::PageWithHeadersAndFooters';
54 augment 'create' => sub {
56 $self->create_tps_report;
60 sub create_tps_report {
61 (shift)->append_body('<report type="tps"/>')
65 my $tps_report = TPSReport->new;
66 isa_ok($tps_report, 'TPSReport');
70 q{<page><header/><report type="tps"/><footer/></page>},
71 '... got the right TPS report');