frame frameset noframe
);
for (@TAGS) {
my $code;
$code = "sub $_ { _elem('$_', \@_); }\n" ;
push(@EXPORT, $_);
eval $code;
if ($@) {
die $@;
}
}
=head1 Private Functions
=head2 _elem()
The _elem() function is wrapped by all the html 'tag' functions. It
takes a tag-name, optional hashref of attributes and a list of content
as parameters.
=cut
sub _elem
{
my $tag = shift;
my $attributes;
if (@_ and defined $_[0] and ref($_[0]) eq "HASH") {
$attributes = shift;
}
my $elem = HTML::Element->new( $tag, %$attributes );
$elem->push_content(@_);
$elem;
}
1;
=2=
THE END |