Lintian::SlidingWindow(3)
β¨ Lintian::SlidingWindow(3) β¨
okay so bestie, this is the section 3 manual page for Lintian::SlidingWindow, and lemme tell you, it's a whole vibe π
πΈ NAME πΈ
Lintian::SlidingWindow β the Lintian interface to sliding window match πͺβ¨
π SYNOPSIS π
use Lintian::SlidingWindow;
my $sfd = Lintian::SlidingWindow->new('<','someevilfile.c', sub { $_ = lc($_); });
my $window;
while ($window = $sfd->readwindow) {
if (index($window, 'evil') > -1) {
if($window =~
m/software \s++ shall \s++
be \s++ used \s++ for \s++ good \s*+ ,?+ \s*+
not \s++ evil/xsim) {
# do something like : tag 'license-problem-json-evil';
}
}
}
like, look at that regex go π it's giving main character energy fr fr
π DESCRIPTION π
Lintian::SlidingWindow gives you a way to match some pattern β including a multi line pattern β without needing to fully load the file in memory. no cap. your RAM stays unbothered, your regex stays fed. π¦
π CLASS METHODS π
new(HANDLE[, BLOCKSUB[, BLOCKSIZE]])
Create a new sliding window by reading from a given HANDLE, which must be open for reading β that's not optional bestie, fr fr.
Optionally run BLOCKSUB against each block. Note that BLOCKSUB should apply transform byte by byte and does not depend of context. so like, keep it local and simple, don't get cute with it π
Each window consists of up to two blocks of BLOCKSIZE characters. yes, up to two β that's the whole slay of the sliding window π₯
π INSTANCE METHODS π
readwindowβ Return a new block of sliding window. Returnundefat end of file. π«Ά"blocksize"blocknumberhandleblocksub
π DIAGNOSTICS π
no data type specified
π AUTHOR π
Originally written by Bastien ROUCARIES for Lintian. king behavior honestly π
β SEE ALSO β
and that's the whole page babes π this was Lintian v2.139.0ubuntu2 from 2026-10-08, Lintian::SlidingWindow(3) β go forth and match your patterns without eating all the memory, ily, periodt β¨π
π¦ where this page comes from
- ubuntu stonking: lintian 2.139.0ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms