[git wiki PATCH] "Modernizing and expanding Git.pm" project
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Mar 3, 2012, 21:14 UTC
- Message-ID
- <1330809281-25774-1-git-send-email-jnareb@gmail.com>
- In-Reply-To
- <20120302091114.GA3984@sigill.intra.peff.net>
--- I'm not sure if my Markdown is entirely correct.
SoC-2012-Ideas.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/SoC-2012-Ideas.md b/SoC-2012-Ideas.md index 02a8fc7..f56b601 100644 --- a/SoC-2012-Ideas.md +++ b/SoC-2012-Ideas.md @@ -181,3 +181,44 @@ this project. Proposed by: Thomas Rast Possible mentor(s): Thomas Rast + +Modernizing and expanding Git.pm +-------------------------------- + +Git.pm was created in 2006 to make it easy to call git commands from +Perl scripts safely, in a portable way (including workarounds required +for ActiveState Perl on MS Windows). Its error handling via exceptions +also comes from that year. + +Git.pm module uses Error (and Error::Simple) for its exception handling. +Unfortunately, while it might looked like a good choice in 2006, Error +module is deprecated: + +> WARNING +> ------- +> +> Using the "Error" module is **no longer recommended** due to the +> black-magical nature of its syntactic sugar, which often tends to +> break. Its maintainers have stopped actively writing code that uses +> it, and discourage people from doing so. See the "SEE ALSO" section +> below for better recommendations. + +Nowadays the recommended solution to exception handling in Perl are +Try::Tiny (or TryCatch, but I don't think Git.pm would need this more +heavyweight module) for capturing and handling exceptions, and +Exception::Class (or Throwable, but that requires heavyweight Moose +object system) for throwing OO exceptions. + +The major goal would be to update Git.pm to modern Perl conventions, +amon others moving from Error / Error::Simple to Try::Tiny and +Exception::Class, preserving backwards compatibility, but perhaps also +adding a better interface and using it in git commands implemented in +Perl. + +Other optional goals would be to extend Git.pm, for example adding +Git::Config module which would read git configuration once like gitweb +does, or Git::Commit module for parsing commit objects, etc. + +Programming language: Perl +Proposed by: Jakub Narębski +Possible mentor(s): Jakub Narębski (?)
-- 1.7.9