Data-Context-BEM

 view release on metacpan or  search on metacpan

lib/Data/Context/BEM.pm  view on Meta::CPAN


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

=head1 SUBROUTINES/METHODS

=head3 C<get_html ( )>

Get the processed HTML

=head3 C<get_styles ( )>

Get the processed Javascript

=head3 C<get_scripts ( )>

Get the processed CSS

=head3 C<block_module ($block)>

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

=head3 C<set_template_path ( $instance, $device_path )>

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

=head3 C<get_template ($block)>

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

=head3 C<dump (@objects)>

Dumps the passed objects to the log file

=head3 C<class ($block)>

Returns the classes for a block.

=head3 C<json ($block)>

Returns the block JSON encoded

=head1 DIAGNOSTICS

=head1 CONFIGURATION AND ENVIRONMENT

=head1 DEPENDENCIES

=head1 INCOMPATIBILITIES

=head1 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.

=head1 BUGS AND LIMITATIONS

There are no known bugs in this module.

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

Patches are welcome.

=head1 AUTHOR

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

=head1 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 L<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.

=cut



( run in 1.453 second using v1.01-cache-2.11-cpan-39bf76dae61 )