Ярослав Коршак > Mojolicious-Plugin-LinkedContent > Mojolicious::Plugin::LinkedContent

Download:
Mojolicious-Plugin-LinkedContent-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  

NAME ^

Mojolicious::Plugin::LinkedContent - manage linked css and js

SYNOPSIS ^

    use base 'Mojolicious';
    sub statup {
        my $self = shift;
        $self->plugin( 'linked_content' );
    }

Somewhere in template:

    % require_js 'myscript.js';

And in <HEAD> of your layout:

    % include_js;

DESCRIPTION ^

Helps to manage scripts and styles included in document.

INTERFACE ^

HELPERS ^

require_js

Add one or more js files to load queue.

require_css

Add one or more css files to load queue.

register

Render the plugin. Internal

include_js =item include_css

Render queue to template

ITEMS

store_items

Internal method

CONFIGURATION AND ENVIRONMENT ^

Mojolicious::Plugin::LinkedContent can recieve parameters when loaded from Mojolicious like this:

    $self->plugin(
        'linked_content',
        'js_base'  => '/jsdir',
        'css_base' => '/cssdir'
    );

If no basedirs provided, '/js' and '/css' used by default

AUTHOR ^

Yaroslav Korshak <ykorshak@gmail.com>

CREDITS ^

Oliver Günther

LICENCE AND COPYRIGHT ^

Copyright (C) 2010 - 2013, Yaroslav Korshak

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

syntax highlighting: