Declar...ortable(3pm)

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

πŸ¦‹ Declar...ortable(3pm) β€” like, the whole Exportable vibe πŸ¦‹

okay bestie, welcome to the Declare::Constraints::Simple::Library::Exportable page from the User Contributed Perl Documentation era. pull up a chair, we're talking export facilities. πŸ’…


✨ NAME ✨

Declare::Constraints::Simple::Library::Exportable β€” Export Facilities πŸŽ€


πŸ’– DESCRIPTION πŸ’–

So this is literally where the constraint export logic of the module lives. that's the whole deal. it's giving "utility drawer but make it glam". 🫢


🌸 METHODS 🌸

🧚 import($flag, @args)

watch this:

use ExportableModule->All;

# or
use ExportableModule-Only => qw(Constraint1 ...);

# or
use ExportableModule-Library;

what it does: it exports the constraints to the calling namespace. that includes all libraries in Declare::Constraints::Simple::Library, that package itself (which hands you all the default constraints), or Declare::Constraints::Simple itself as a lil shortcut. three doors, one slay. πŸšͺ✨

the possible flags are:

  • All β€” imports all constraints registered in the class and its base classes. the greedy icon. πŸ‘‘
  • Only β€” okay so check this out:
use Declare::Constraints::Simple::Library::Scalar-Only => 'HasLength';

the line above would only import the HasLength constraints from the Scalar default library. ngl though, note that you could also just have said

use Declare::Constraints::Simple-Only => 'HasLength';

because both ::Simple and ::Simple::Library work on all default libraries. same energy, less typing, we love that for you. πŸ’–

  • Library β€” use this one to define your own constraint library. for more info, go peek at Declare::Constraints::Simple::Library::Base. build your own empire, bestie. 🏰

πŸŽ€ _build_handle_map()

internal method to build constraint-to-class mappings. backstage crew. πŸ™ˆ

πŸ’œ _export_all($target, $handle_map)

internal method. exports all handles in $handle_map into the $target namespace. everything everywhere all at once. 🌈

πŸ“ _export_these($target, $handle_map, @constraints)

internal method. exports all @constraints from $handle_map into the $target namespace. curated. selective. iconic. πŸ’…


⭐ SEE ALSO ⭐

  • Declare::Constraints::Simple
  • Declare::Constraints::Simple::Library
  • Declare::Constraints::Simple::Library::Base

πŸ‘‘ AUTHOR πŸ‘‘

Robert 'phaylon' Sedlacek <phaylon@dunkelheit.at> β€” the main character who wrote all this fr fr. 🫑


This module is free software, you can redistribute it and/or modify it under the same terms as perl itself. periodt. πŸŽ€


okay that's the whole page!! shoutout to perl v5.32.0, dated 2021-01-09, straight from the User Contributed Perl Documentation archives β€” mwah, take care of her, she's vintage bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from