String::Sections::Result - Glorified wrapper around a hash representing a parsed String::Sections result
version 0.3.2
sections
my $sections = $result->sections; for my $key( keys %{$sections}) { ... }
set_current
$result->set_current('foo');
has_current
if ( $result->has_current ){ }
section
my $ref = $result->section( $name ); print ${$ref};
section_names
This contains the names of the sections in the order they were found/inserted.
my @names = $result->section_names;
section_names_sorted
has_section
if ( $result->has_section($name) ) { ... }
set_section
$result->set_section($name, \$data);
append_data_to_current_section
# Unitialise slot $result->append_data_to_current_section(); # Unitialise and/or extend slot $result->append_data_to_current_section('somedata');
append_data_to_section
# Unitialise slot $result->append_data_to_current_section( $name ); # Unitialise and/or extend slot $result->append_data_to_current_section( $name, 'somedata');
shallow_clone
my $clone = $result->shallow_clone; if ( refaddr $clone->section('foo') == refaddr $result->section('foo') ) { print "clone success!" }
shallow_merge
my $merged = $result->shallow_merge( $other ); if ( refaddr $merged->section('foo') == refaddr $result->section('foo') ) { print "foo copied from orig successfully!" } if ( refaddr $merged->section('bar') == refaddr $other->section('bar') ) { print "bar copied from other successfully!" }
to_s
my $str = $result->to_s
_current
_section_names
my $current = $result->_current;
_compose_section
my $str = $result->_compose_section('bar');
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2013 by Kent Fredric <kentnl@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install String::Sections, copy and paste the appropriate command in to your terminal.
cpanm
cpanm String::Sections
CPAN shell
perl -MCPAN -e shell install String::Sections
For more information on module installation, please visit the detailed CPAN module installation guide.