Datum::Strip(3pm)
β¨ Carp::Datum::Strip π
okay bestie, welcome to the User Contributed Perl Documentation corner of the internet, where Datum::Strip lives π«Ά (yes the man page header says Datum::Strip(3pm), we're keeping that energy).
πΈ NAME πΈ
Carp::Datum::Strip β it strips most Carp::Datum calls lexically. literally its whole personality π
π SYNOPSIS π
use Carp::Datum::Strip qw(datum_strip);
datum_strip("-", "-");
datum_strip($file, "$file.new", ".bak");
π¦ DESCRIPTION π¦
So this module exports exactly one routine β a single icon, a solo main character β called datum_strip(), and its whole job is to remove calls to Carp::Datum routines lexically. that's it. that's the mission. β¨
Now, because the stripping happens lexically, there are some restrictions about what's actually supported. ngl, this is the fine print and it matters: unless you follow the conventions documented in Carp::Datum, stripping will be incorrect. no cap. π
The general guidelines are:
- Do not use here documents or generalized quotes (
qq) within assertion expression or tags. Write assertions using''or"", as appropriate. just be normal about it π - Assertions can be safely put on several lines, but must end with a semi-colon, outside any string. periodt. β¨
There are two calls that will never be stripped: VERIFY() and DTRACE(). The VERIFY() is meant to be preserved (or "DREQUIRE" would have been used). "DTRACE", when called, will be remapped dynamically to some "Log::Agent" routine, depending on the trace level. See Carp::Datum for details. π
π INTERFACE π
The interface of the datum_strip() routine is:
"datum_strip" old_file, new_file, [ext]β okay so: old_file specifies the old file path, the one to be stripped. The stripped version will be written to new_file. π
If the optional third argument ext is given (e.g. ".bak"), then old_file will be renamed with the supplied extension, and new_file will be renamed old_file. Renaming only occurs if stripping was successful (i.e. the new file was correctly written to disk). so like, no glow-up for the filename unless the write actually worked, bestie π
The lowest nine "rwx" mode bits from old_file are preserved when creating new_file. π
Both old_file and new_file can be set to "-", in which case STDIN and STDOUT are used, respectively, and no renaming can occur, nor any mode bit propagation. π«Ά
Returns true on success, "undef" on error. that's the vibe check right there π₯
π AUTHORS π
Christophe Dehaudt and Raphael Manfredi are the original authors. π iconic behavior fr fr
Send bug reports, hints, tips, suggestions to Dave Hoover at <squirrel@cpan.org>. he's literally waiting for your emails, be nice π
β SEE ALSO β
Carp::Datum(3). go read it, iykyk π¦
and that's the whole page, bestie! this one shipped as perl v5.34.0 dated 2022-06-30 β mwah, go strip something responsibly π
β¨π
π¦ where this page comes from
- debian bookworm: libcarp-datum-perl 1:0.1.3-9 Β· Artistic-1.0-Perl
- debian trixie: libcarp-datum-perl 1:0.1.3-9 Β· Artistic-1.0-Perl
- ubuntu noble: libcarp-datum-perl 1:0.1.3-9 Β· Artistic-1.0-Perl
- ubuntu resolute: libcarp-datum-perl 1:0.1.3-9 Β· Artistic-1.0-Perl
- ubuntu stonking: libcarp-datum-perl 1:0.1.3-9 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms