Parse-Path
view release on metacpan or search on metacpan
README.html view on Meta::CPAN
<h2><a class='u'
name="Normalization_of_splits"
>Normalization of splits</a></h2>
<p>While <a href="#auto_normalize" class="podlinkpod"
>"auto_normalize"</a> controls normalization of steps, delimiter normalization is still automatic. For example:</p>
<pre> my $path = Parse::Path->new(
path => 'foo//////bar.txt',
style => 'File::Unix',
);
say $path->as_string; # foo/bar.txt</pre>
<p>This is because delimiters are not actually stored anywhere after parsing. The <a href="#as_string" class="podlinkpod"
>"as_string"</a> method takes the hash steps and re-adds the delimiters, per rules on the blueprint of the path class. (See <a href="http://search.cpan.org/perldoc?Parse%3A%3APath%3A%3ARole%3A%3APath#delimiter_placement" class="podlinkpod"
>"delimiter_placement" in Parse::Path::Role::Path</a>.)</p>
<h2><a class='u'
name="Sparse_arrays_and_memory_usage"
>Sparse arrays and memory usage</a></h2>
<p>Since arrays within paths are based on indexes, there's a potential security issue with large indexes causing abnormal memory usage with certain modules that would use these paths. In Perl, these two arrays would have drastically different mem...
<pre> my @small;
$small[0] = 1;
my @large;
$large[999999] = 1;</pre>
<p>This can be mitigated by making sure the Path style you use will limit the total digits for array indexes. <a href="http://search.cpan.org/perldoc?Parse%3A%3APath" class="podlinkpod"
>Parse::Path</a> handles this on all of its paths, but it's something to be aware of if you create your own path classes.</p>
<h1><a class='u'
name="SEE_ALSO"
>SEE ALSO</a></h1>
<p><a href="http://search.cpan.org/perldoc?Data%3A%3ASplitSerializer" class="podlinkpod"
>Data::SplitSerializer</a> - Uses this module for path parsing</p>
<h1><a class='u'
name="AVAILABILITY"
>AVAILABILITY</a></h1>
<p>The project homepage is <a href="https://github.com/SineSwiper/Parse-Path/wiki" class="podlinkurl"
>https://github.com/SineSwiper/Parse-Path/wiki</a>.</p>
<p>The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <a href="http://www.perl.com/CPAN/" class="podlinkurl"
>http://www.perl.com/CPAN/</a> to find a CPAN site near you, or see <a href="https://metacpan.org/module/Parse::Path/" class="podlinkurl"
>https://metacpan.org/module/Parse::Path/</a>.</p>
<h1><a class='u'
name="SUPPORT"
>SUPPORT</a></h1>
<h2><a class='u'
name="Internet_Relay_Chat"
>Internet Relay Chat</a></h2>
<p>You can get live help by using IRC ( Internet Relay Chat ). If you don't know what IRC is, please read this excellent guide: <a href="http://en.wikipedia.org/wiki/Internet_Relay_Chat" class="podlinkurl"
>http://en.wikipedia.org/wiki/Internet_Relay_Chat</a>. Please be courteous and patient when talking to us, as we might be busy or sleeping! You can join those networks/channels and get help:</p>
<ul>
<li>irc.perl.org
<p>You can connect to the server at 'irc.perl.org' and talk to this person for help: SineSwiper.</p>
</li>
</ul>
<h2><a class='u'
name="Bugs_/_Feature_Requests"
>Bugs / Feature Requests</a></h2>
<p>Please report any bugs or feature requests via <a href="https://github.com/SineSwiper/Parse-Path/issues" class="podlinkurl"
>https://github.com/SineSwiper/Parse-Path/issues</a>.</p>
<h1><a class='u'
name="AUTHOR"
>AUTHOR</a></h1>
<p>Brendan Byrd <bbyrd@cpan.org></p>
<h1><a class='u'
name="COPYRIGHT_AND_LICENSE"
>COPYRIGHT AND LICENSE</a></h1>
<p>This software is Copyright (c) 2013 by Brendan Byrd.</p>
<p>This is free software, licensed under:</p>
<pre> The Artistic License 2.0 (GPL Compatible)</pre>
<!-- end doc -->
</body></html>
( run in 0.779 second using v1.01-cache-2.11-cpan-39bf76dae61 )