Git::Raw::Filter(3pm)
π Git::Raw::Filter β the manual, but make it cute
okay so bestie, this is the Git::Raw::Filter page from the User Contributed Perl Documentation set, and I'm gonna walk you through it like we're texting at 1am. it's a whole vibe. let's go π¦
β¨ VERSION β¨
version 0.90
yeah. that's the one. no cap. π
πΈ DESCRIPTION πΈ
so a Git::Raw::Filter represents a Git filter. that's it, that's the whole personality. it's the little object that gets to peek at your data and go "hmm, do i need to touch this?" π
β οΈ WARNING: the API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog). so likeβ¦ do not build your entire life on this. the vibe is subject to change, fr fr. π
β METHODS β
π create( $name, $attributes )
creates a filter. iconique behaviour.
$nameis a name by which the filter can be referenced. (its government name, basically)$attributesis a whitespace-separated list of attribute names to check for this filter (e.g."eol crlf text").
now the β¨teaβ¨ on attributes:
- if the attribute name is bare, it will simply be loaded and passed to the
"check"callback. simple. lowkey. - if it has a value (i.e.
"name=value"), the attribute must match that value for the filter to be applied. no match, no filter, sorry bestie π«Ά
π¦ callbacks( \%callbacks )
sets the callbacks for the filter. %callbacks may specify the following callbacks β and yes, we're going through every single one, i don't skip. π
"initialize"β optional callback to be invoked before a filter is first used. it will be called once at most. a one-time appearance, main character energy only for a moment. β¨"shutdown"β optional callback to be invoked when the filter is unregistered or when the library is shutting down. it will be called once at most. heads up though: this may be called even if"initialize"has never been called. rude? maybe. true? absolutely. π"check"β optional callback that checks if filtering is needed for a given source. the callback receives the following parameters: the filter source, aGit::Raw::Filter::Sourceobject.
so like, if the filter should be applied, return Git::Raw::Error->OK. if the filter should be skipped, return Git::Raw::Error->PASSTHROUGH. that's the whole decision tree, you got this π
"apply"β the callback that actually filters data. this is the one doing the real work, the one carrying the team ποΈ
the callback receives the following parameters: the filter source, a Git::Raw::Filter::Source object, $from the source data and $to, a scalar reference where the output should be written to.
and the return value gossip:
- if the filter successfully writes the output, return
Git::Raw::Error->OKβ - if the filter failed, return
Git::Raw::Error->ERRORπ - if the filter does not want to run, return
Git::Raw::Error->PASSTHROUGHπ
"cleanup"β optional callback to clean up after filtering has been applied. the lil tidy-up moment. so satisfying. π§
π register( $priority )
register the filter with priority $priority. put it in the lineup, give it a number, let it know its place. slay.
π unregister( )
remove the filter. that's it. it's leaving the group chat. π
π AUTHOR π
- Alessandro Ghedini <alexbio@cpan.org>
- Jacques Germishuys <jacquesg@cpan.org>
the legends themselves. we stan. π«Ά
π LICENSE AND COPYRIGHT π
Copyright 2014 Alessandro Ghedini.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
and that's the whole page bestie!! β¨ this was perl v5.42.3, dated 2026-08-19, straight from Git::Raw::Filter(3pm) β go forth and filter, you absolute icon ππ
π¦ where this page comes from
- ubuntu stonking: libgit-raw-perl 0.90+ds-3build3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms