Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

git::repository::plugin(3pm) [debian man page]

Git::Repository::Plugin(3pm)				User Contributed Perl Documentation			      Git::Repository::Plugin(3pm)

NAME
Git::Repository::Plugin - Base class for Git::Repository plugins SYNOPSIS
package Git::Repository::Plugin::Hello; use Git::Repository::Plugin; our @ISA = qw( Git::Repository::Plugin ); sub _keywords { return qw( hello hello_gitdir ) } sub hello { return "Hello, git world! "; } sub hello_gitdir { return "Hello, " . $_[0]->git_dir . "! "; } 1; DESCRIPTION
"Git::Repository::Plugin" allows one to define new methods for "Git::Repository", that will be imported in the "Git::Repository" namespace. The SYNOPSIS provides a full example. The documentation of Git::Repository describes how to load plugins with all the methods they provide, or only a selection of them. METHODS
"Git::Repository::Plugin" provides a single method: install( @keywords ) Install all keywords provided in the "Git::Repository" namespace. If called with an empty list, will install all available keywords. SUBCLASSING
When creating a plugin, the new keywords that are added by the plugin to "Git::Repository" must be returned by a "_keywords()" method. AUTHOR
Philippe Bruhat (BooK), "<book at cpan.org>" ACKNOWLEDGEMENTS
Thanks to Todd Rinalo, who wanted to add more methods to "Git::Repository", which made me look for a solution that would preserve the minimalism of "Git::Repository". After a not-so-good design using @ISA (so "Git::Repository" would inherit the extra methods), further discussions with Aristotle Pagaltzis and a quick peek at Dancer's plugin management helped me come up with the current design. Thank you Aristotle and the Dancer team. Further improvements to the plugin system proposed by Aristotle Pagaltzis. COPYRIGHT
Copyright 2010 Philippe Bruhat (BooK). LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-12-28 Git::Repository::Plugin(3pm)

Check Out this Related Man Page

Git::Repository::Log::Iterator(3pm)			User Contributed Perl Documentation		       Git::Repository::Log::Iterator(3pm)

NAME
Git::Repository::Log::Iterator - Split a git log stream into records SYNOPSIS
use Git::Repository::Log::Iterator; # use a default Git::Repository context my $iter = Git::Repository::Log::Iterator->new('HEAD~10..'); # or provide an existing instance my $iter = Git::Repository::Log::Iterator->new( $r, 'HEAD~10..' ); # get the next log record while ( my $log = $iter->next ) { ...; } DESCRIPTION
"Git::Repository::Log::Iterator" initiates a git log command from a list of paramaters and parses its output to produce "Git::Repository::Log" objects represening each log item. METHODS
new( @args ) Create a new git log stream from the parameter list in @args and return a iterator on it. "new()" will happily accept any parameters, but note that "Git::Repository::Log::Iterator" expects the output to look like that of "--pretty=raw", and so will force the the "--pretty" option (in case "format.pretty" is defined in the Git configuration). Extra output (like patches) will be stored in the "extra" parameter of the "Git::Repository::Log" object. Decorations will be lost. When unsupported options are recognized in the parameter list, "new()" will "croak()" with a message advising to use "run( 'log' => ... )" to parse the output yourself. next() Return the next log item as a "Git::Repository::Log" object, or nothing if the stream has ended. AUTHOR
Philippe Bruhat (BooK), "<book at cpan.org>" COPYRIGHT
Copyright 2010 Philippe Bruhat (BooK), all rights reserved. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-12-28 Git::Repository::Log::Iterator(3pm)
Man Page