Log::R...xtract(3pm)
π Log::R...xtract(3pm) π
okay bestie, welcome to the Log::R...xtract(3pm) manual page β straight out of the User Contributed Perl Documentation vault β¨. It's a Perl module and it's lowkey a whole vibe if you're into translation tooling, which you're about to be π«Ά
πΈ NAME πΈ
Log::Report::Extract β collecting translatable strings, one message-id at a time π
π¦ INHERITANCE π¦
Log::Report::Extract gets extended by these iconic children:
Log::Report::Extract::PerlPPILog::Report::Template::Extract
like it's giving proud parent energy fr fr π
β¨ SYNOPSIS β¨
# See the extensions
that's it, that's the synopsis. the extensions said "iykyk" π
π DESCRIPTION π
so here's the tea, bestie π: this module is the one that helps you maintain your POT files β aka it keeps that list of message-ids inside them all fresh and up to date β¨.
after initiation, you gotta call the process() method with literally every file that changed since the last time you processed. once you do that, the existing PO files get updated accordingly, no cap π₯.
and if there are no translations yet? don't even stress β one textdomain/xx.po file will be created for you π
iconic behavior honestly.
π METHODS π
π Constructors
$class->new(%options)
here's the options table, vibe check it:
- Option β Default
charsetβ'utf-8'lexiconβ <required>charset => STRINGβ the character-set used in the PO files β¨lexicon => DIRECTORYβ the place where the lexicon is kept. and when no lexicon is defined yet, THIS is the directory where adomain/xx.pofile will be created π«Ά
πΈ Accessors
$obj->addPot($domain, $pot, %options)β adds a POT, bestie π$obj->charset()β returns the character-set that's used inside the POT files β¨$obj->domains()β returns a sorted list of all known domain names ποΈ$obj->index()β returns theLog::Report::Lexicon::Indexobject, which is the one listing the files in the lexicon directory tree π³$obj->pots($domain)β returns the list ofLog::Report::Lexicon::POTobjects which contain the tables for$domainπ
π§ Processors
$obj->cleanup(%options)β remove all references. like, all of them π§Ή
here's the options table:
- Option β Default
keepβ[]keep => HASH|ARRAYβ keep the information about these filename, either specified as an ARRAY of names, or a HASH where the keys are the named π
$obj->process($filename, %options)β update the domains mentioned in$filename. all text-domains defined in the file will get updated automatically, but heads up bestie β οΈ: they should not be written before all files are processed. what you get back is the number of messages found in this particular file π’$obj->showStats([$domains])β show a status about the DOMAIN (and by default, all domains). at least mode verbose is required to see this, so don't come crying if it's quiet π
the statistics are sent to (Log::Report) dispatchers which accept notice and info. this could be syslog πΎ. and when you have no explicit dispatchers in your program, the level of detail gets controlled by the 'mode':
use Log::Report mode => 'DEBUG'; # or 'VERBOSE'
$obj->store( $domain, $filename, $linenr, $context, $msg, [$msg_plural] )β register the existence of a ($msg,$msg_plural) in all POTs of the$domainπ$obj->write( [$domain], %options )β update the information of the files related to$domain, and by default that means all processed DOMAINS π
all information known about the written $domain is removed from the cache (poof π¨). and the %options get passed straight to the write() of the specific lexicon manager π«Ά
π DIAGNOSTICS π
- Fault: cannot create lexicon directory
$dir:$!
Cast by new()
- Error: extractions require an explicit lexicon directory
Cast by new()
- Error: no context tags allowed in plural
`$msgid'
Cast by store()
- Info: starting new textdomain
$domain, template in$filename
Cast by write()
π SEE ALSO π
this module is part of Log-Report-Lexicon version 1.15, built on November 06, 2025 β. Website: http://perl.overmeer.net/CPAN/ π
π LICENSE π
for contributors see file ChangeLog π
this software is copyright (c) 2007-2025 by Mark Overmeer π
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself β slay, go forth and redistribute periodt π
and that's a wrap, bestie π¦ this little edition ran on perl v5.40.1, dated 2025-11-11, and you read the Log::R...xtract(3pm) page top to bottom like a true main character ππ mwah, go collect those strings β¨
π¦ where this page comes from
- ubuntu resolute: liblog-report-lexicon-perl 1.15-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblog-report-lexicon-perl 1.15-1 Β· 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