@ISA
=
qw(Embperl::Syntax::HTML)
;
sub
new {
my
$class
=
shift
;
my
$self
= Embperl::Syntax::HTML::new(
$class
);
if
(!
$self
->{-randomInit}) {
$self
->{-randomInit} = 1;
init(
$self
);
}
return
$self
;
}
sub
init {
my
$self
=
shift
;
$self
->AddTag(
'qq'
, [
'href'
],
undef
,
undef
, {
perlcode
=>
q[ {
# _ep_sa is an apparently undocumented function which
# allows you to rewrite an attribute of the current node
# specified by %$n%
_ep_sa(%$n%, 'href', Embperl::Syntax::Test2::rewrite_url(%&'href%));
}]
,
});
$self
->AddTag(
'a'
, [
'href'
],
undef
,
undef
, {
perlcode
=>
q[ {
# _ep_sa is an apparently undocumented function which
# allows you to rewrite an attribute of the current node
# specified by %$n%
_ep_sa(%$n%, 'href', Embperl::Syntax::Test2::rewrite_url(%&'href%));
}]
,
});
}
sub
rewrite_url
{
warn
"rewrite_url got $_[0]\n"
;
return
"**$_[0]**12**"
;
}
1 ;