File::Spec::Memoized - Memoization of File::Spec to make it faster
This document describes File::Spec::Memoized version 1.00.
# All you have to do is load this module. use File::Spec::Memoized; # Once this module is loaded, File::Spec features # will become faster. my $path = File::Spec->catfile('path', 'to', 'file.txt');
File::Spec is used everywhere, but its performance is not so good because a lot of internal calls of canonpath() consumes CPU.
canonpath()
File::Spec::Memoized applies File::Spec with memoization technique (or data caching). Once you load this module, File::Spec methods will become significantly faster. Moreover, some modules that depend on File::Spec, e.g. Path::Class, could become faster.
Path::Class
This module adopts File::Spec methods, so you need no changes in your program. All you have to do is say use File::Spec::Memoized.
use File::Spec::Memoized
File::Spec::Memoized->flush_cache()
Clears the cache and frees the memory used for the cache.
Perl 5.6.2 or later.
No bugs have been reported.
Please report any bugs or feature requests to the author.
File::Spec
Goro Fuji (gfx) <gfuji(at)cpan.org>
Copyright (c) 2010, Goro Fuji (gfx). Some rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install File::Spec::Memoized, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Spec::Memoized
CPAN shell
perl -MCPAN -e shell install File::Spec::Memoized
For more information on module installation, please visit the detailed CPAN module installation guide.