XML::Tag export only one helper named tag that helps you to create your dialect.
the parameters of tag are
* the name of the tag * content sub * a hashref with the list of default attributes for the tag
the content sub returns a list, the first elements of the lists are
use Modern::Perl; use XML::Tag;
sub foo (&) { tag foo => @_, {qw< isa foo >} }
say foo{ + {qw< class bar id bang >} , {qw< style text-align:center >} , "this is " , "the content" };
To install XML::Tag, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Tag
CPAN shell
perl -MCPAN -e shell install XML::Tag
For more information on module installation, please visit the detailed CPAN module installation guide.