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. Return undef at end of file. 🫢
  • "blocksize"
  • blocknumber
  • handle
  • blocksub

πŸ’€ 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