Tags::Utils::Preserve - TODO
use Tags::Utils::Preserve; my $obj = Tags::Utils::Preserve->new(%params); my $preserved_flag = $obj->begin; my ($preserver_flag, $prev_preserved_flag) = $obj->begin; my $preserved_flag = $obj->end; my ($preserved_flag, $prev_preserved_flag) = $obj->end; $obj->get; $obj->reset; $obj->save_previous;
new(%params)
Constructor.
preserved
TODO
begin()
end()
get()
reset()
save_previous()
new(): From Class::Utils::set_params(): Unknown parameter '%s'.
# Pragmas. use strict; use warnings; # Modules. use Tags::Utils::Preserve; # Begin element helper. sub begin_helper { my ($pr, $tag) = @_; print "TAG: $tag "; my ($pre, $pre_pre) = $pr->begin($tag); print "PRESERVED: $pre PREVIOUS PRESERVED: $pre_pre\n"; } # End element helper. sub end_helper { my ($pr, $tag) = @_; print "ENDTAG: $tag "; my ($pre, $pre_pre) = $pr->end($tag); print "PRESERVED: $pre PREVIOUS PRESERVED: $pre_pre\n"; } # Object. my $pr = Tags::Utils::Preserve->new( 'preserved' => ['tag'] ); # Process. begin_helper($pr, 'foo'); begin_helper($pr, 'tag'); begin_helper($pr, 'foo'); end_helper($pr, 'foo'); end_helper($pr, 'tag'); end_helper($pr, 'foo'); # Output: # TAG: foo PRESERVED: 0 PREVIOUS PRESERVED: 0 # TAG: tag PRESERVED: 1 PREVIOUS PRESERVED: 0 # TAG: foo PRESERVED: 1 PREVIOUS PRESERVED: 1 # ENDTAG: foo PRESERVED: 1 PREVIOUS PRESERVED: 1 # ENDTAG: tag PRESERVED: 0 PREVIOUS PRESERVED: 1 # ENDTAG: foo PRESERVED: 0 PREVIOUS PRESERVED: 0
Class::Utils, List::MoreUtils, Readonly.
Tags, Tags::Output, Tags::Output::ESIS, Tags::Output::Indent, Tags::Output::LibXML, Tags::Output::PYX, Tags::Output::Raw, Tags::Output::SESIS, Tags::Utils.
https://github.com/tupinek/Tags
Michal Špaček mailto:skim@cpan.org
http://skim.cz/
BSD 2-Clause License
0.03
To install Tags, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tags
CPAN shell
perl -MCPAN -e shell install Tags
For more information on module installation, please visit the detailed CPAN module installation guide.