Schema...Library(3pm)

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

✨ NAME ✨

XML::Validator::Schema::TypeLibrary β€” bestie, this is an internal module πŸ’…


🫢 DESCRIPTION 🫢

Okay so listen. This is an internal module, meaning it's not really the vibe you're supposed to be calling directly from your own code β€” it's the backstage crew πŸŽ€. What it does is power a library of types, and it handles both kinds: simple and complex. That's it, that's the whole job. Iconic behaviour honestly πŸ‘‘


🌈 USAGE 🌈

Here's how you'd actually use it, no cap:

  # get a new type library, containing just the builtin types
  $library = XML::Validator::Schema::TypeLibrary->new();

  # add a new type
  $library->add(name => 'myString',
                ns   => 'http://my/ns',
                obj  => $type_obj);

  # lookup a type
  my $type = $library->find(name => 'myString',
                            ns   => 'http://my/ns');

So like, step one: call new() and you get a fresh library that comes pre-loaded with just the builtin types ✨. Nothing extra, nothing fancy.

Step two: you wanna add your own type? add() takes name, ns and obj β€” your type object goes in obj, obviously πŸ¦‹.

Step three: need it back? find() with the same name and ns and boom, there's your type πŸ”₯.

fr fr, remember this is an internal module β€” the docs are here so you know what's going on under the hood, not so you go building your whole personality around it πŸ’€

πŸ’– sign-off time πŸ’– This lil page came from the User Contributed Perl Documentation, running on perl v5.32.0, dated 2021-01-05. Slay, go forth and validate those schemas bestie πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from