Templa...t::RDF(3pm)

πŸ“¦
version 0.47 Β· 2 versions
  • 0.47 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.47 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay bestie, gather round: Template::Declare::TagSet::RDF β€” it's the Template::Declare tag set for RDF. that's the whole vibe. ✨


🌸 SYNOPSIS 🌸

here's how you actually use it on your side, no cap:

# normal use on the user side:
use base 'Template::Declare';
use Template::Declare::Tags RDF => { namespace => 'rdf' };

template foo => sub {
    rdf::RDF {
        attr { 'xmlns:rdf' => "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }
        rdf::Description {
            attr { about => "Matilda" }
            #...
        }
    }
};

like… look at that nesting. it's giving structure. it's giving ✨semantics✨. obsessed. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so Template::Declare::TagSet::RDF defines a full set of RDF tags for use in Template::Declare templates. that's its whole job and it does it flawlessly, periodt. πŸ‘‘

but here's the tea: you generally won't use this module directly, bestie. instead you load it via:

use Template::Declare::Tags 'RDF';

that's the move. that's the way. πŸ’…


πŸŽ€ METHODS πŸŽ€

🌈 new( PARAMS )

my $html_tag_set = Template::Declare::TagSet->new({
    package   => 'MyRDF',
    namespace => 'rdf',
});

this is the constructor, and it's inherited from Template::Declare::TagSet. lowkey iconic of it to just inherit like that. 😌

⭐ get_tag_list

my $list = $tag_set->get_tag_list();

returns an array ref of all the RDF tags defined by Template::Declare::TagSet::RDF. yes, an array ref. not a list. an array ref. noted. πŸ“

and here is the complete list, character for character, because we do not skip details in this house:

  • "Alt"
  • "Bag"
  • "Description"
  • "List"
  • "Property"
  • "RDF"
  • "Seq"
  • "Statement"
  • "XMLLiteral"
  • "about"
  • "li"
  • "first"
  • "nil"
  • "object"
  • "predicate"
  • "resource"
  • "rest"
  • "subject"
  • "type"
  • "value"
  • "_1"
  • "_2"
  • "_3"
  • "_4"
  • "_5"
  • "_6"
  • "_7"
  • "_8"
  • "_9"
  • "_10"
heads up though β€” this list may be not exhaustive. so if you find some important missing ones, please let us know. :) πŸ’Œ (yes the smiley is canon, i'm keeping the smiley, it's cute)

πŸ‘‘ AUTHOR πŸ‘‘

Agent Zhang <agentzh@yahoo.cn> β€” the mastermind. the main character. thank you for your service. πŸ«‘πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

go read these next, bestie, they're all part of the same little universe:

  • Template::Declare::TagSet
  • Template::Declare::TagSet::HTML
  • Template::Declare::TagSet::XUL
  • Template::Declare::Tags
  • Template::Declare

and that's a wrap on the Template::Declare::TagSet::RDF(3pm) page, from the User Contributed Perl Documentation, brought to you by perl v5.34.0, dated 2022-06-17. mwah, slay, go write some RDF, ily πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from