Poet::Script(3pm)

πŸ“¦
version 0.16 Β· 2 versions
  • 0.16 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.16 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Poet::Script β€” bestie, it's giving "boot up my script" energy πŸ’–

ok so this is Poet::Script, from the User Contributed Perl Documentation, and it's literally the module that gets Poet all set up for a script. that's it, that's the whole job. πŸŽ€


✨ NAME ✨

Poet::Script β€” initializes Poet for a script πŸ’…


🌸 SYNOPSIS 🌸

bestie just drop this at the top of your script and you're so back:

# In a script...
use Poet::Script qw($cache $conf $poet $log :file);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this module is what you use to initialize Poet for a script. it does the following, and no we're not skipping any of it:

  • figures out the environment root by looking upwards from the directory of the current script until it finds the Poet marker file (.poet_root). iconic detective work fr fr πŸ”
  • reads and parses the configuration files. reading. parsing. slay. πŸ“–
  • shifts the lib/ subdirectory of the environment root onto @INC. yep, it's literally just scootching that bad boy over so your code can be found 🫢
  • imports the specified quick vars and utility sets into the current package β€” see Poet::Import for the deets πŸ’œ
ngl that last bullet is doing a lot of heavy lifting, so if you wanna know what those quick vars and utility sets actually are, go read Poet::Import. i'm not gonna make stuff up, that's not the vibe. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • Poet

🌈 AUTHOR 🌈

Jonathan Swartz <swartz@pobox.com> β€” thank you for your service king 🫑✨


This software is copyright (c) 2012 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free software, we love to see it πŸ’–


and that's the whole page, bestie! this one's from perl v5.34.0, dated 2022-06-18, and it's Poet::Script(3pm) β€” go forth and initialize your scripts, you absolute main character πŸ’…πŸŒΈβ­

πŸ“¦ where this page comes from