Git::Repository::Plugin::Blame::Cache - Cache the output of Git::Repository->blame().
Git::Repository->blame()
Version 1.3.0
use Git::Repository::Plugin::Blame::Cache; # Instantiate the cache for a given repository. my $cache = Git::Repository::Plugin::Blame::Cache->new( repository => $repository, ); my $repository = $cache->get_repository(); # Cache blame lines. $cache->set_blame_lines( file => $file, blame_lines => $blame_lines, ); # Retrieve blame lines from the cache. my $blame_lines = $cache->get_blame_lines( file => $file, );
Cache the output of Git::Repository::Plugin::Blame->blame() and Git::Repository->blame() by extension.
Git::Repository::Plugin::Blame->blame()
Return a cache object for the specified repository.
my $cache = Git::Repository::Plugin::Blame::Cache->new( repository => $repository, options => $options, );
Arguments:
repository (mandatory)
A unique way to identify a repository. Typically, the root path of the repository.
blame_args (optional)
A hashref of arguments used to generate the git blame output, if applicable. This avoids caching the same output for git blame and git blame -w, for example.
git blame
git blame -w
Return the unique identifier for the repository.
my $repository = $cache->get_repository();
Retrieve git blame lines from the cache (if they exist) for a given file.
my $blame_lines = $cache->get_blame_lines( file => $file, );
file (mandatory)
The file for which you want the cached git blame output.
Store in the cache the output of git blame for a given file.
$cache->set_blame_lines( file => $file, blame_lines => $blame_lines, );
The file for which you are caching the git blame output.
blame_lines (mandatory)
The output of Git::Repository::Plugin::Blame->blame().
Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/Git-Repository-Plugin-Blame/issues. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Git::Repository::Plugin::Blame
You can also look for information at:
GitHub (report bugs there)
https://github.com/guillaumeaubert/Git-Repository-Plugin-Blame/issues
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Git-Repository-Plugin-Blame
CPAN Ratings
http://cpanratings.perl.org/d/Git-Repository-Plugin-Blame
MetaCPAN
https://metacpan.org/release/Git-Repository-Plugin-Blame
Guillaume Aubert, <aubertg at cpan.org>.
<aubertg at cpan.org>
Copyright 2012-2015 Guillaume Aubert.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/
To install Git::Repository::Plugin::Blame, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Repository::Plugin::Blame
CPAN shell
perl -MCPAN -e shell install Git::Repository::Plugin::Blame
For more information on module installation, please visit the detailed CPAN module installation guide.