1DublinCore::Element(3)User Contributed Perl DocumentationDublinCore::Element(3)
2
3
4

NAME

6       DublinCore::Element - Class for representing a Dublin Core element
7

SYNOPSIS

9           my $element = DublinCore::Element->new( \%info );
10           print "content:   ", $element->content(), "\n";
11           print "qualifier: ", $element->qualifier(), "\n";
12           print "language:  ", $element->language(), "\n";
13           print "scheme:    ", $element->scheme(), "\n";
14

DESCRIPTION

16       DublinCore::Record methods such as element(), elements(), title(), etc
17       return DublinCore::Element objects as their result. These can be
18       queried further to extract an elements content, qualifier, language,
19       and schema. For a definition of these attributes please see RFC 2731
20       and <http://www.dublincore.org>.
21

METHODS

23   new()
24       The constructor. Take a hashref of input arguments.
25
26   content()
27       Gets and sets the content of the element.
28
29           ## extract the element
30           my $title = $record->element( 'title' );
31           print $title->content();
32
33           ## or you can chain them together
34           print $record->element( 'title' )->content();
35
36   qualifier()
37       Gets and sets the qualifier used by the element.
38
39   language()
40       Gets and sets the language of the content in element.
41
42   scheme()
43       Gets and sets the scheme used by the element.
44
45   name()
46       Gets and sets the element name (title, creator, date, etc).
47
48   is_empty()
49       Gets and sets the "empty" status of an element. This is useful when
50       using DublinCore::Record's element() method.
51
52       To see if the record has an creator elements:
53
54           if( $record->element( 'creator' )->is_empty ) {
55               # no creators
56           }
57
58   set()
59       This function overrides the default set() behavior in order to remove
60       the is_empty flag.
61

SEE ALSO

63       •   DublinCore::Record
64

AUTHOR

66       •   Ed Summers <ehs@pobox.com>
67
68       •   Brian Cassidy <bricas@cpan.org>
69
71       Copyright 2007 by Ed Summers, Brian Cassidy
72
73       This library is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself.
75
76
77
78perl v5.32.1                      2021-01-27            DublinCore::Element(3)
Impressum