| 1 | |||
| 2 | package Embperl::Syntax::Test; | ||
| 3 | |||
| 4 | use strict; | ||
| 5 | use Embperl::Syntax qw{:types} ; | ||
| 6 | use Embperl::Syntax::HTML ; | ||
| 7 | use base qw(Embperl::Syntax::HTML); | ||
| 8 | |||
| 9 | |||
| 10 | sub new | ||
| 11 | { | ||
| 12 | my $class = shift; | ||
| 13 | my $self = Embperl::Syntax::HTML::new($class); | ||
| 14 | |||
| 15 | if (!$self->{-testInit}) | ||
| 16 | { | ||
| 17 | $self->{-testInit} = 1; | ||
| 18 | init($self); | ||
| 19 | } | ||
| 20 | return $self; | ||
| 21 | } | ||
| 22 | |||
| 23 | sub init { | ||
| 24 | my $self = shift; | ||
| 25 | |||
| 26 | $self->AddTagInside('testname', ['type'], undef, undef, { | ||
| 27 | perlcode => q[{ | ||
| 28 | _ep_rp(%$x%, "test syntax %&'type%"); | ||
| 29 | }] | ||
| 30 | }); | ||
| 31 | |||
| 32 | } | ||
| 33 | |||
| 34 | |||
| 35 | 1; |