The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Context::BEM - A Perl implementation of BEM

VERSION

This documentation refers to Data::Context::BEM version 0.0.1

SYNOPSIS

   use Data::Context::BEM;

   # Brief but working code example(s) here showing the most common usage(s)
   # This section will be as far as many users bother reading, so make it as
   # educational and exemplary as possible.

DESCRIPTION

BEM is a framework/protocol for how to build HTML or XML pages. The specification suggests how to assemble a page using Blocks, Elements and Modifiers.

The essence of this module is to provide a perl implementation that particularly allows the easy packaging of Blocks so they can be distributed alone and used by any site using this library. The aim is also that any site using this module can overwrite any part of an external block.

Deployed Blocks

Here is what an example block (Example) might look like:

 lib/MyApp/BEM/Block/Example.pm
 root/block/example/block.js
 root/block/example/block.css

SUBROUTINES/METHODS

get_html ( )

Get the processed HTML

get_styles ( )

Get the processed Javascript

get_scripts ( )

Get the processed CSS

block_module ($block)

Returns a module that belongs to a block (if one exists)

set_template_path ( $instance, $device_path )

Fora given Data::Context::BEM::Instance sets the Template path based on the specified template_path and the blocks used.

get_template ($block)

For a given block returns the template name used to process that block.

dump (@objects)

Dumps the passed objects to the log file

class ($block)

Returns the classes for a block.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

INCOMPATIBILITIES

HISTORY

While this is an attempt at implementing Yandex's BEM protocol it is also influenced by work of one of the people who originally started the work at Yandex but left before it had evolved into BEM.

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.