-
-
27 Mar 2011 19:01:40 UTC
- Distribution: DBIx-Class-InflateColumn-Markup-Unified
- Module version: v0.21.1
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers
- Kwalitee
Bus factor: 0- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (12.31KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
DBIx::Class::InflateColumn::Markup::Unified - Automatically formats a text column with Textile, Markdown or BBCode.
VERSION
version v0.21.1
SYNOPSIS
Load this component and declare that text columns use a markup language. You can either "hard code" the markup language into the column, or grab it from another column in the row (must be 'markup_lang' right now). This is useful if each row might use a different markup langauge. Supported languages are Textile, Markdown and BBCode.
package Posts; __PACKAGE__->load_components(qw/InflateColumn::Markup Core/); __PACKAGE__->add_columns( text => { data_type => 'TEXT', is_nullable => 0, is_markup => 1, markup_lang => 'textile', } ); # or, alternatively __PACKAGE__->add_columns( text => { data_type => 'TEXT', is_nullable => 0, is_markup => 1, }, markup_lang => { data_type => 'VARCHAR', is_nullable => 0, size => 60, }, );
Then, printing the column will automatically use the markup language:
print $row->text; # automatically formats according to the markup language # you can also use print $row->text->formatted; # again, automatically formats print $row->text->unformatted; # prints the text as-is, unformatted
METHODS
register_column
Chains with "register_column" in DBIx::Class::Row, and formats columns appropriately. This would not normally be called directly by end users.
AUTHOR
Ido Perlmuter,
<ido at ido50.net>
BUGS
Please report any bugs or feature requests to
bug-dbix-class-inflatecolumn-markup-unified at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-Class-InflateColumn-Markup-Unified. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc DBIx::Class::InflateColumn::Markup::Unified
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class-InflateColumn-Markup-Unified
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/DBIx-Class-InflateColumn-Markup-Unified
CPAN Ratings
http://cpanratings.perl.org/d/DBIx-Class-InflateColumn-Markup-Unified
Search CPAN
http://search.cpan.org/dist/DBIx-Class-InflateColumn-Markup-Unified/
SEE ALSO
DBIx::Class, DBIx::Class::InflateColumn, Markup::Unified
COPYRIGHT & LICENSE
Copyright 2009-2011 Ido Perlmuter.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install DBIx::Class::InflateColumn::Markup::Unified, copy and paste the appropriate command in to your terminal.
cpanm DBIx::Class::InflateColumn::Markup::Unified
perl -MCPAN -e shell install DBIx::Class::InflateColumn::Markup::Unified
For more information on module installation, please visit the detailed CPAN module installation guide.