Shipwright::Util(3)

πŸ“¦
version 2.4.42 Β· 2 versions
, in fedora 43

okay bestie, pull up a chair because it's time for Shipwright::Util(3) β€” the user-contributed Perl doc that's basically a lil treasure chest of helper functions. no cap, it's a whole vibe. πŸ’–


🌸 LIST 🌸

here's the rundown of everything this module is serving you.

✨ General Helpers ✨

  • load_yaml, load_yaml_file, dump_yaml, dump_yaml_file β€” these four are literally just dropped in from YAML::Tiny. that's it, that's the whole story, they came pre-loaded like a starter pack. πŸŽ€
  • confess_or_die β€” it's here! the docs don't spill any extra tea on it, it just sits in the list looking iconic. πŸ’…
  • parent_dir β€” returns the dir's parent dir. heads up tho: the arg you pass in must be a dir path. πŸ—‚οΈ
  • run_cmd β€” a wrapper of the run3 sub in IPC::Run3. πŸƒ
  • select_fh β€” a wrapper for the select in core. πŸŒ€
  • find_module β€” takes a perl modules name space and the name of a module in that space. it finds and returns the matching module name using a case insensitive search. for example:
find_module('Shipwright::Backend', 'svn');
# returns 'Shipwright::Backend::SVN'

find_module('Shipwright::Backend', 'git');
# returns 'Shipwright::Backend::Git'

and if there's literally no module matching your criteria? it returns undef. sad but true, bestie. 😭

πŸ¦‹ PATHS πŸ¦‹

  • shipwright_root β€” returns the root directory that Shipwright has been installed into. it uses %INC to figure out where Shipwright.pm is. sneaky smart, honestly. πŸ”
  • share_root β€” returns the 'share' directory of the installed Shipwright module. currently this is only used to store the initial files in project. πŸ“
  • user_home β€” returns the current user's home directory. 🏠
  • shipwright_user_root β€” the user's own shipwright root, where we put internal files in. it's ~/.shipwright by default. plot twist: it can be overwritten by $ENV{SHIPWRIGHT_USER_ROOT}. πŸ‘‘

πŸ’œ NAME πŸ’œ

Shipwright::Util - Util

yes, that's the name. yes, it's just "Util". she's lowkey mysterious like that. ✨


🌟 AUTHOR 🌟

sunnavy "<sunnavy@bestpractical.com>"

shoutout to the author, absolute legend, main character energy fr fr. 🫢


Copyright 2007-2015 Best Practical Solutions.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

legal stuff, but make it cute β€” go forth and remix, bestie. 🌈


and that's the whole page, bestie! this was perl v5.42.0 vibes, dated 2025-07-25, and you just finished reading Shipwright::Util(3) β€” slay, you ate that. periodt. πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from