Object::Relation::DataType::MediaType - Object::Relation MediaType objects
use aliased 'Object::Relation::DataType::MediaType'; my $media_type = MediaType->bake('text/html');
This module creates the "media_type" data type for use in Object::Relation attributes. It subclasses the MIME::Type module to offer media types to Object::Relation applications. It differs from MIME::Type in providing the bake() method for deserialization from the data store. Use the type() method for serialization.
bake()
type()
my $media_type = Object::Relation::DataType::MediaType->new($string);
Overrides the implementation of new() in MIME::Type to redispatch to bake() if there is only one argument. Otherwise, it sends the arguments off to MIME::Type's new().
new()
my $media_type = Object::Relation::DataType::MediaType->bake($string);
Parses a media type string and returns a Object::Relation::DataType::MediaType object. If the media type does not currently exist, it will be created by calling new().
Copyright (c) 2004-2006 Kineticode, Inc. <info@obj_relode.com>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Object::Relation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::Relation
CPAN shell
perl -MCPAN -e shell install Object::Relation
For more information on module installation, please visit the detailed CPAN module installation guide.