The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::Spec::Memoized - Memoization of File::Spec to make it faster

VERSION

This document describes File::Spec::Memoized version 1.00.

SYNOPSIS

    # 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');

DESCRIPTION

File::Spec is used everywhere, but its performance is not so good because a lot of internal calls of canonpath() consumes CPU.

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.

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.

INTERFACE

Cache control methods

File::Spec::Memoized->flush_cache()

Clears the cache and frees the memory used for the cache.

DEPENDENCIES

Perl 5.6.2 or later.

BUGS

No bugs have been reported.

Please report any bugs or feature requests to the author.

SEE ALSO

File::Spec

AUTHOR

Goro Fuji (gfx) <gfuji(at)cpan.org>

LICENSE AND COPYRIGHT

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.