Git::Repository::Plugin::Blame::Line - Store the git blame information for a line of code.
Version 1.1.1
use Git::Repository::Plugin::Blame::Line; my $line = Git::Repository::Plugin::Blame::Line->new( line_number => $line_number, line => $line, commit_attributes => \%commit_attributes, commit_id => $commit_id, ); print "The line number is " . $line->get_line_number() . "\n"; print "The line is " . $line->get_line() . "\n"; print "The commit ID is " . $line->get_commit_id() . "\n"; print "The commit attributes are: \n"; while ( my ( $name, $value ) = each( %{ $line->get_commit_attributes() } ) ) { print " - $name: $value\n"; }
This module stores the git blame information for a line of code.
Create a new Git::Repository::Plugin::Blame::Line object.
my $line = Git::Repository::Plugin::Blame::Line->new( line_number => $line_number, line => $line, commit_attributes => \%commit_attributes, commit_id => $commit_id, );
All parameters are mandatory:
'line_number'
The number of this line in the file that git blame was applied to.
'line'
The text/code of this line in the file that git blame was applied to.
'commit_attributes'
A hashref of attributes for the last commit that modified this line.
'commit_id'
The ID of the last commit that modified this line.
Return the number of this line in the file that git blame was applied to.
my $line_number = $line->get_line_number();
Return the text/code of this line in the file that git blame was applied to.
my $line = $line->get_line();
Return the SHA-1 of the last commit that modified this line.
my $commit_id = $line->get_commit_id();
Return the hashref of attributes for the last commit that modified this line.
my $commit_attributes = $line->get_commit_attributes();
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::Line
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-2013 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.