manipulate(3pm)

πŸ“¦
version 0.2.2.1build1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– manipulate(3pm) β€” the user-contributed Perl docs, but make it a group chat πŸ’–

okay bestie, sit DOWN, because this is manipulate(3pm), a User Contributed Perl Documentation page, and it's literally all about messing with files. not in a toxic way. in a ✨file-manipulation✨ way. let's go πŸ¦‹


🌸 NAME 🌸

OpaL::manipulate β€” a Perl extension for manipulating files. that's it. that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

  use OpaL::manipulate qw(functions);

no cap: nothing gets exported automatically β€” not one function, not one variable β€” so you HAVE to name the ones you want right there in that qw(...). the module is not gonna guess for you, she's not a mind reader. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

OpaL::manipulate is a module for manipulating files. (iconic, straightforward, no notes. πŸ’―)

and here's the cute part: all the functions are autoloaded, so they do not get loaded into memory unless you've actually used them before. it's giving minimal effort until you're needed. main character energy, honestly. πŸ‘‘


🌈 FUNCTIONS 🌈

πŸ’œ perlmodifyadvanced

it simply applies the script to the file to change its content. that's the whole job. πŸ’…

you also have to pass along a message to say what you're doing β€” mostly for debugging, and also for when any error occurs. and then there's the error level, which tells how critical this action is to the script. so: script, message, error level. all three, bestie.

USAGE:
    "perlmodifyadvanced"("file", "script",
                       "message", errorlevel);

the errorlevel is optional. πŸ™ˆ


πŸ¦‹ perlmodify

this one simply fixes some stuff in the script string, and then it calls perlmodifyadvanced. so it's basically the pre-game routine before the actual function shows up. 😌

USAGE:
    "perlmodify"("file", "script",
               "message", errorlevel);

the errorlevel is optional here too. ⭐


🌸 perlmodify_insertafter

this function searches for something (a regular expression). if it's found, it inserts the text after it. but β€” and this is the important part β€” it will never insert the text twice. it has boundaries. we love that for her. πŸŽ€

you also have to apply a message to tell what you're doing, mostly for debugging and for when any error occurs. the error level tells how critical this action is to the script.

USAGE:
    "perlmodify_insertafter"("file", "find", "text",
                           "message", errorlevel);

and yep, the errorlevel is optional. πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Ola Lundqvist <ola@inguza.com>

(the icon who wrote this. respect. 🫑)


πŸ’… REQUIRES πŸ’…

  • OpaL::action
  • OpaL::read

⭐ SEE ALSO ⭐


and that's the whole page, bestie, we ate and left zero crumbs πŸ“βœ¨

perl v5.40.1 Β· 2025-12-17 Β· and that's the manipulate(3pm) era, dated and versioned and everything, periodt. πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from