HTML::BBReverse 0.07 review

Download
by rbytes.net on

HTML::BBReverse is a Perl module to convert HTML to BBCode and back. SYNOPSIS use HTML::BBReverse my $bbr = HTML::BBRe

License: Perl Artistic License
File size: 8K
Developer: Y. Heling
0 stars award from rbytes.net

HTML::BBReverse is a Perl module to convert HTML to BBCode and back.

SYNOPSIS

use HTML::BBReverse

my $bbr = HTML::BBReverse->new();

# convert BBCode into HTML
my $html = $bbr->parse($bbcode);
# convert generated HTML back to BBCode
my $bbcode = $bbr->reverse($html);

HTML::BBReverse is a pure perl module for converting BBCode to HTML and is able to convert the generated HTML back to BBCode.

And why would you want to reverse the generated HTML? Well, when you have a nice dynamic website where you and/or visitors can post messages, and in those messages BBCode is used for markup. In normal cases, your website has a lot more pageviews than edits, and saving all those messages as HTML will be a lot faster than saving them as the original BBCode and parsing them to HTML for every visit.

So now all BBCode gets converted to HTML before it will be saved, but what if you want to edit a message? Just reverse the generated HTML back to BBCode, edit your message, and save it as HTML again.

Requirements:
Perl

HTML::BBReverse 0.07 search tags