Data::Context::BEM - A Perl implementation of BEM
This documentation refers to Data::Context::BEM version 0.1
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.
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.
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
Get the processed HTML
Get the processed CSS
Returns a module that belongs to a block (if one exists)
For a given block returns the template name used to process that block.
Dumps the passed objects to the log file
Returns the classes for a block.
Returns the block JSON encoded
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.
There are no known bugs in this module.
Please report problems to Ivan Wills (firstname.lastname@example.org).
Patches are welcome.
Ivan Wills - (email@example.com)
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.