DublinCore::Element - Class for representing a Dublin Core element
my $element = DublinCore::Element->new( \%info ); print "content: ", $element->content(), "\n"; print "qualifier: ", $element->qualifier(), "\n"; print "language: ", $element->language(), "\n"; print "scheme: ", $element->scheme(), "\n";
DublinCore::Record methods such as element(), elements(), title(), etc return DublinCore::Element objects as their result. These can be queried further to extract an elements content, qualifier, language, and schema. For a definition of these attributes please see RFC 2731 and http://www.dublincore.org.
The constructor. Take a hashref of input arguments.
Gets and sets the content of the element.
## extract the element my $title = $record->element( 'title' ); print $title->content(); ## or you can chain them together print $record->element( 'title' )->content();
Gets and sets the qualifier used by the element.
Gets and sets the language of the content in element.
Gets and sets the scheme used by the element.
Gets and sets the element name (title, creator, date, etc).
Gets and sets the "empty" status of an element. This is useful when using DublinCore::Record's element() method.
To see if the record has an creator elements:
if( $record->element( 'creator' )->is_empty ) { # no creators }
This function overrides the default set() behavior in order to remove the is_empty flag.
DublinCore::Record
Ed Summers <ehs@pobox.com>
Brian Cassidy <bricas@cpan.org>
Copyright 2007 by Ed Summers, Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install DublinCore::Record, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DublinCore::Record
CPAN shell
perl -MCPAN -e shell install DublinCore::Record
For more information on module installation, please visit the detailed CPAN module installation guide.