---
name: "MojoX::Types"
section: "3pm"
platform: "linux"
package: "libmojolicious-perl"
version: "0.999926-1+squeeze2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/MojoX::Types"
---

# MojoX::Types(3pm)

MIME Types

## NAME

MojoX::Types - MIME Types

## SYNOPSIS

```
    use MojoX::Types;
    # New type list
    my $types = MojoX::Types->new;
    # Get MIME type for ".png"
    my $type = $types->type('png');
    # Add MIME type for ".foo"
    $types->type(foo => 'mojo/foo');
```

## DESCRIPTION

MojoX::Types is a container for MIME types.

## ATTRIBUTES

MojoX::Types implements the following attributes.

### "types"

```
    my $map = $types->types;
    $types  = $types->types({png => 'image/png'});
```

List of MIME types.

## METHODS

MojoX::Types inherits all methods from Mojo::Base and implements the following ones.

### "type"

```
    my $type = $types->type('png');
    $types   = $types->type(png => 'image/png');
```

Get or set MIME type for file extension.

## SEE ALSO

Mojolicious, Mojolicious::Guides, \<http://mojolicious.org\>.
