Query: git::repository::plugin
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Git::Repository::Plugin(3pm) User Contributed Perl Documentation Git::Repository::Plugin(3pm)NAMEGit::Repository::Plugin - Base class for Git::Repository pluginsSYNOPSISpackage 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.SUBCLASSINGWhen creating a plugin, the new keywords that are added by the plugin to "Git::Repository" must be returned by a "_keywords()" method.AUTHORPhilippe Bruhat (BooK), "<book at cpan.org>"ACKNOWLEDGEMENTSThanks 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.COPYRIGHTCopyright 2010 Philippe Bruhat (BooK).LICENSEThis 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)