Export...:Export(3pm)

πŸ“¦
version 0.114 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Export...:Export(3pm) β€” okay so this is the base class for all export objects, and she's the blueprint bestie that every other export object inherits from πŸ’…


✨ DESCRIPTION ✨

Okay so listen. All exports are refs, and all are blessed. Periodt, that's the whole vibe. Every single export object you'll ever meet is a reference that got blessed into a class, no exceptions.

This class keeps track of some per-export info using an inside-out objects system β€” which is exactly as mysterious and cool as it sounds. All the stuff an export might need to do, like injecting itself into a package, gets handled right here in this class. 🫢

Why does that matter? Because it lets all the complicated, or ugly logic get abstracted out of the exporter and metadata classes. She's basically taking one for the team so the other classes can stay cute and unbothered ✨


πŸŽ€ METHODS πŸŽ€

  • $class->new( $ref, exported_by => $package, %data ) β€” Create a brand new export from $ref. You MUST specify the name of the class doing the exporting via exported_by. Not optional, bestie, she needs to know who her parent is πŸ’€
  • $export->inject( $package, $name, @args ) β€” This one injects the export into $package under $name. And @args? lowkey ignored in most cases ngl. But if you wanna see a case where they actually are used, go check out Exporter::Declare::Export::Generator β€” she's the exception that ate πŸ’…
  • $package = $export->exported_by() β€” Returns the name of the package this export was originally exported from. It's giving "where do I come from" energy 🌸
  • @params = $export->required_specs() β€” Documented for subclassing purposes. This one should always return a list of required parameters at construction time. Always, fr fr ⭐
  • $export->DESTROY() β€” Also documented for subclassing purposes. This handles all the cleanup related to storing data in an inside-out objects system. She's the one tidying up after the party 🧹✨

πŸ‘‘ AUTHORS πŸ‘‘

Chad Granum exodist7@gmail.com β€” the icon, the moment, the legend 🫢


Copyright (C) 2010 Chad Granum

Exporter-Declare is free software; Standard perl licence.

Exporter-Declare is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. πŸ™ˆ

no cap, that warranty disclaimer is doing the MOST, but she's legally required to say it, so we respect it πŸ’€

okay bye bestie, mwah πŸ’‹ this was perl v5.34.0, dated 2022-06-13 β€” go forth and bless some refs, you absolute main character πŸŒˆπŸ¦‹πŸ’–

πŸ“¦ where this page comes from