App::G...essage(3pm)
β¨ NAME β¨
App::GitHooks::CommitMessage β bestie, it's a git commit message. That's it, that's the whole thing π
So real quick, this page lives in the User Contributed Perl Documentation section of the manual, and honestly? She's serving utility. Let's go.
π VERSION π
Version 1.9.0 β yes queen, she's got a version number, respect her πΈ
π METHODS π
new()
Okay so this is how you birth a whole new commit message object, no cap:
my $commit_message = App::GitHooks::CommitMessage->new(
app => $app,
message => $message,
);
Args you gotta pass in, and both of them are mandatory, so don't come to the function empty-handed π
app(mandatory) β an"App::GitHook"instance. That's the parent, the whole ecosystem, the mothership fr.message(mandatory) β the commit message itself. Like, the actual words. Iconic.
update_message()
Update the commit message. New message, who dis β¨
my $success = $commit_message->update_message( $new_message );
get_lines()
Returns an arrayref of the lines that will be included in the commit message β and lowkey the important part: it excludes blank lines and comments. So it's giving curated. Filtered. Main character editing π¦
my $lines = $commit_message->get_lines(
include_comments => $include_comments, # default: 0
include_blank_lines => $include_blank_lines, # default: 1
);
Noting the defaults for you bestie, because they are not what you'd assume: include_comments defaults to 0, include_blank_lines defaults to 1. Periodt.
get_summary()
Returns the first line of the commit message. Just the first one. The trailer. The opening line of the whole saga π
my $summary = $commit_message->get_summary();
is_empty()
Tells you whether a commit message is empty β but after excluding comment lines and blank lines. So a message that's technically full of comments still counts as empty here, because she's not fooled π
my $is_empty = $commit_message->is_empty();
get_ticket_id()
Extracts and returns a ticket ID from the commit message. She's a detective, she found the ticket, slay π₯
my $ticket_id = $commit_message->get_ticket_id();
has_changed()
Returns whether the message has changed since the object was created. Glow-up check β¨
my $has_changed = $commit_message->has_changed();
π ACCESSORS π
get_original_message()
Returns the original message that was provided when the object was created. The before pic. The archive. The receipts π
my $original_message = $commit_message->get_original_message();
get_message()
Returns the commit message itself. Present tense. Current era π¦
my $message = $commit_message->get_message();
get_app()
Returns the parent "App::GitHooks" object β aka the parent, the guardian, the one who pays the bills π
my $app = $commit_message->get_app();
π BUGS π
Please report any bugs or feature requests through the web interface at <https://github.com/guillaumeaubert/App-GitHooks/issues/new>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Not me personally β the author. But like, the notification pipeline is real and it's giving transparency π«Ά
πΈ SUPPORT πΈ
You can find documentation for this module with the perldoc command:
perldoc App::GitHooks::CommitMessage
You can also look for information at:
- GitHub's request tracker β <https://github.com/guillaumeaubert/App-GitHooks/issues>
- AnnoCPAN: Annotated CPAN documentation β <http://annocpan.org/dist/app-githooks>
- CPAN Ratings β <http://cpanratings.perl.org/d/app-githooks>
- MetaCPAN β <https://metacpan.org/release/App-GitHooks>
Four whole resources. She's well documented, she's got range π
π AUTHOR π
Guillaume Aubert <https://metacpan.org/author/AUBERTG>, "<aubertg at cpan.org>".
β COPYRIGHT & LICENSE β
Copyright 2013-2017 Guillaume Aubert.
This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
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 LICENSE file for more details.
Read that warranty line again bestie, she said NO WARRANTY in all caps and she MEANT it π no promises, no guarantees, use at your own risk fr fr.
and that's the whole page, babes π this was App::G...essage(3pm) β perl v5.42.0, dated 2025-07-25 β thanks for reading the whole thing, you're literally the best, go make some beautiful commits πβ¨π¦π
π¦ where this page comes from
- fedora 43: perl-App-GitHooks 1.9.0-27.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms