Biblio...lidate(3pm)

πŸ’– Biblio::COUNTER::Processor::Validate β€” the manual, but make it cute πŸ’–

okay bestie, you found the Biblio::COUNTER::Processor::Validate page in the User Contributed Perl Documentation, and honestly? it's giving "quiet little validator that does the most." let's get into it πŸ¦‹


✨ NAME ✨

Biblio::COUNTER::Processor::Validate β€” it's a simple COUNTER report validator. that's it, that's the whole job, and it does it slayfully πŸ’…


🌸 SYNOPSIS 🌸

use Biblio::COUNTER::Processor::Validate;
$processor = Biblio::COUNTER::Processor::Validate->new;
$report = $processor->run;

three lines. that's the entire entrance exam. you make a processor, you run it, you get a report. iconic. no cap. ✨


πŸŽ€ DESCRIPTION πŸŽ€

so here's the vibe: Biblio::COUNTER::Processor::Validate takes a COUNTER report and does a little two-channel split, like it's DJing your data 🎧

  • to standard error, it prints a verbose stream of data from the report β€” like, everything, very chatty, main character energy
  • to standard output, it prints the report with corrections β€” so you get the fixed-up version on the clean channel

one stream for the tea, one stream for the receipts. obsessed. 🫢


πŸ‘‘ PUBLIC METHODS πŸ‘‘

🧚 new(%args)

$processor = Biblio::COUNTER::Processor::Validate->new;

makes you a brand new processor. that's the whole thing. constructor behavior, constructor vibes. 🌈

πŸ“ run($file)

$report = $processor->run($what);

Process the given report. periodt. πŸ’…

and what even is $what, you ask? bestie, $what is flexible like that, it can be:

  • a file handle πŸ‘€
  • the name of a file πŸ“
  • or an instance of (a subclass of) Biblio::COUNTER::Report β€” yes, subclasses count too, we love an inheritance moment

⭐ ignore(@events)

$processor->ignore(qw/line input output/);

this is how you tell the processor which events to ignore. you just pass in the event names you don't wanna hear about, and it'll respectfully mind its own business about them.

ngl, the various events are documented over in Biblio::COUNTER β€” so if you need the full event menu, that's where you go. iykyk πŸ“–

πŸ’œ INHERITANCE πŸ’œ

Biblio::COUNTER::Processor::Validate is designed to be inheritable. it was built to be a parent, it wants you to subclass it, it's ready to pass its genes down. generational wealth but for code, fr fr. 🧬


πŸ’€ BUGS πŸ’€

There are no known bugs. (we love a flawless queen. not me manifesting it though πŸ™ˆ)

but if you do find one, please report bugs to the author via e-mail (see below). don't be shy, they wanna know. βœ‰οΈ


πŸ“ TO DO πŸ“

Document in detail the output that's produced.

that's the to-do list. it's one item. it's been sitting there. we're all rooting for it. 🌱


🌟 AUTHOR 🌟

Paul Hoffman (nkuitse AT cpan DOT org)


Copyright 2008-2009 Paul M. Hoffman.

This is free software, and is made available under the same terms as Perl itself. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

  • Biblio::COUNTER
  • Biblio::COUNTER::Report
  • Biblio::COUNTER::Report::Processor

and that's the whole page, bestie 🫢 this one came out of the User Contributed Perl Documentation, and the footer says it's perl v5.36.0, dated 2023-02-04 β€” so yeah, vintage but still serving. go validate something, you got this πŸ’…βœ¨

πŸ“¦ where this page comes from