.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Atompub::MediaType 3pm" .TH Atompub::MediaType 3pm 2024-03-04 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Atompub::MediaType \- a media type object for the Atom Publishing Protocol .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Atompub::MediaType qw(media_type); \& \& my $type = media_type(\*(Aqimage/png\*(Aq); \& \& "$type"; # \*(Aqimage/png\*(Aq \& $type\->type; # \*(Aqimage\*(Aq \& $type\->subtype; # \*(Aqpng\*(Aq \& \& $type\->extension; # \*(Aqpng\*(Aq \& \& $type\->is_a(\*(Aqimage/*\*(Aq); # true \& $type\->is_a(\*(Aqimage/gif\*(Aq); # false \& \& my $type = media_type(\*(Aqentry\*(Aq); \& \& "$type"; # \*(Aqapplication/atom+xml;type=entry\*(Aq \& $type\->type; # \*(Aqapplication\*(Aq \& $type\->subtype; # \*(Aqatom+xml\*(Aq \& $type\->parameters; # \*(Aqtype=entry\*(Aq \& \& $type\->subtype_major; # \*(Aqxml\*(Aq \& \& $type\->extension; # \*(Aqatom\*(Aq \& \& $type\->is_a(\*(Aqapplication/xml\*(Aq); # true \& $type\->is_a(\*(Aqfeed\*(Aq); # false .Ve .SH METHODS .IX Header "METHODS" .ie n .SS "Atompub::MediaType\->new([ $type ])" .el .SS "Atompub::MediaType\->new([ \f(CW$type\fP ])" .IX Subsection "Atompub::MediaType->new([ $type ])" Returns a media type object representing the time \f(CW$type\fR. .PP \&\f(CW$type\fR is string representing media type like 'image/png'. Some aliases are defined for Atom, 'entry', 'feed', 'service', and 'categories'. .ie n .SS "media_type([ $str ])" .el .SS "media_type([ \f(CW$str\fP ])" .IX Subsection "media_type([ $str ])" Alias for Atompub::MediaType\->new .ie n .SS $type\->type .el .SS \f(CW$type\fP\->type .IX Subsection "$type->type" .ie n .SS $type\->subtype .el .SS \f(CW$type\fP\->subtype .IX Subsection "$type->subtype" .ie n .SS $type\->parameters .el .SS \f(CW$type\fP\->parameters .IX Subsection "$type->parameters" .ie n .SS $type\->subtype_major .el .SS \f(CW$type\fP\->subtype_major .IX Subsection "$type->subtype_major" .ie n .SS $type\->extensions .el .SS \f(CW$type\fP\->extensions .IX Subsection "$type->extensions" .ie n .SS $type\->extension .el .SS \f(CW$type\fP\->extension .IX Subsection "$type->extension" .ie n .SS $type\->is_a .el .SS \f(CW$type\fP\->is_a .IX Subsection "$type->is_a" .ie n .SS $type\->is_not_a .el .SS \f(CW$type\fP\->is_not_a .IX Subsection "$type->is_not_a" .ie n .SS $type\->as_string .el .SS \f(CW$type\fP\->as_string .IX Subsection "$type->as_string" .ie n .SS $type\->without_parameters .el .SS \f(CW$type\fP\->without_parameters .IX Subsection "$type->without_parameters" .SH "SEE ALSO" .IX Header "SEE ALSO" Atompub .SH AUTHOR .IX Header "AUTHOR" Takeru INOUE, .SH "LICENCE AND COPYRIGHT" .IX Header "LICENCE AND COPYRIGHT" Copyright (c) 2007, Takeru INOUE \f(CW\*(C`\*(C'\fR. All rights reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. .SH "DISCLAIMER OF WARRANTY" .IX Header "DISCLAIMER OF WARRANTY" BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. .PP IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.