NAME

Struct::Path::PerlStyle - Perl-style syntax frontend for Struct::Path.

VERSION

Version 0.41

SYNOPSIS

use Struct::Path::PerlStyle qw(ps_parse ps_serialize);

$struct = ps_parse('{a}{b}[1]');    # Struct::Path compatible
$string = ps_serialize($struct);    # convert Struct::Path path to string

EXPORT

Nothing is exported by default.

PATH SYNTAX

Examples:

"{a}{b}"              # means b's value
"{a}{}"               # all values from a's subhash; same for arrays (using empty square brackets)
"{a}{b,c}"            # b's and c's values
"{a}{b c}"            # same, space is also a delimiter
"{a}{'space inside'}" # keys with spaces/tabs must be quoted (double quotes supported as well)
"{a}{b}[0,1,2,5]"     # 0, 1, 2 and 5 array's items
"{a}{b}[0..2,5]"      # same, but using ranges
"{a}{b}[9..0]"        # descending ranges allowed (perl doesn't)
"{a}{b}<<{c}"         # step back (perl incompatible)
"{a}{/regexp/}"       # regexp keys match

SUBROUTINES

ps_parse

Parse perl-style string to Struct::Path path

$struct_path = ps_parse($string);

ps_serialize

Serialize Struct::Path path to perl-style string

$string = ps_serialize($struct_path);

AUTHOR

Michael Samoglyadov, <mixas at cpan.org>

BUGS

Please report any bugs or feature requests to bug-struct-path-native at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Struct-Path-PerlStyle. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Struct::Path::PerlStyle

You can also look for information at:

SEE ALSO

Struct::Path, Struct::Diff, perldata

LICENSE AND COPYRIGHT

Copyright 2016 Michael Samoglyadov.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.