in reply to Re: Modules you build yourself = Your Child
in thread Modules you build yourself = Your Child

The AUBBC looks slightly better at the first look, I ain't gonna waste any more time.

I have now tested it to include it in my Parse::BBCode compare.html.
It is fast (almost as fast as HTML::BBReverse), but unfortunately like the latter it creates invalid HTML with unbalanced tags:

perl -Ilib -wle' use AUBBC; my $p = AUBBC->new; my $bbcode = "[i] italic [b]bold[/b] end"; my $html = $p->do_all_ubbc($bbcode); print $html; ' <i> italic <b>bold</b> end
So it's basically unusable in a web forum because it can break the output HTML. I didn't find something about unbalanced tags in the docs.
It allows block elements like div inside of elements like i or b.
These are the reasons why it is so fast because it replaces start and end tags independently.
The module does not have any tests.
Source code is IMHO not very readable. No, too small or inconsistent indenting, very long lines. But of course, source code is just a matter of taste...

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.