Module:...::Share(3)

πŸ’… Module:...::Share(3) β€” like, the whole manual, but make it make sense

okay bestie, so this is the page for Module:...::Share β€” it lives in the User Contributed Perl Documentation section of the manual, and it's genuinely one of those little pages that saves your whole entire build. Let's get into it πŸ’–


✨ NAME ✨

Module::Install::Share β€” install non-code files so you can actually use them at run-time. that's it. that's the whole job. iconic behavior honestly πŸŽ€


🌸 SYNOPSIS 🌸

# Put everything inside ./share/ into the distribution 'auto' path
install_share 'share';

# Same thing as above using the default directory name
install_share;

see how the second one is just the first one with zero extra typing? that's the default directory name doing its thing. lowkey elegant πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so like β€” distributions aren't only Perl modules and Perl binary applications, right? some of them also need to install read-only data files somewhere on the file system so they can be read at run-time. yes. files. living on disk. after install. it's giving real-world needs πŸ’…

and what kind of files, you ask? things like:

  • XML Schemas
  • YAML data files
  • SQLite databases

those are, like, the classic examples of the sort of stuff a distribution might typically need to have available after installation. no cap 🫢

Module::Install::Share is a Module::Install extension that gives you commands to install these files into the applicable location on disk. that's the whole vibe ✨

and when you need to find those files again after installation so you can use them inside your module? that's this extension's companion module, File::ShareDir. they're a duo. iykyk πŸ’–

πŸ™ˆ TO DO πŸ™ˆ

okay so here's the honest part, and we love honesty:

Currently install_share installs not only the files you want β€” if it's called by the author, it will also copy .svn and other source-control directories, plus other junk. 😭

the plan to fix it: enhance this to copy only files under share that are in the MANIFEST, or possibly those not in MANIFEST.SKIP.

so... yeah. that's the to-do. it's on the list. it's giving "we know" πŸ’€


πŸ‘‘ AUTHORS πŸ‘‘

  • Audrey Tang <autrijus@autrijus.org>
  • Adam Kennedy <adamk@cpan.org>

legends. both of them. periodt 🌟


πŸ¦‹ SEE ALSO πŸ¦‹

  • Module::Install
  • File::ShareDir

those two. go read them. they're the whole ecosystem around this page 🌈


Copyright 2006 Audrey Tang, Adam Kennedy.

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

See <http://www.perl.com/perl/misc/Artistic.html> πŸ’œ


and that's the page!! πŸŽ€ cute little sign-off for you: this was perl v5.42.0, dated 2023-04-29, and the page itself is Module:...::Share(3) β€” go install your share files bestie, you got this 🫢✨

πŸ“¦ where this page comes from