Hi,

I've been trying to write a configuration file with one string, but the string includes an whole object not just one line like the most configuration modules work:

host
host='example.com'
port='80'

But in my case it's a bigger object, this is how parse.pl looks like:

#!/usr/bin/perl my $p = Parse::BBCode->new({ tags => { '' => sub { my $e = Parse::BBCode::escape_html($_[2]); $e =~ s/\r?\n|\r/<br>\n/g; $e }, i => '<i>%s</i>', b => '<b>%{parse}s</b>', field => '<fieldset>%{parse}s</fieldset>', size => '<font size="%a">%{parse}s</font>', url => 'url:<a href="%{link}A">%{parse}s</a>', wikipedia => 'url:<a href="http://wikipedia.../?search +=%{uri}A">%{parse}s</a>', noparse => '<pre>%{html}s</pre>', quote => 'block:<blockquote>%s</blockquote>', code => { code => sub { my ($parser, $attr, $content, $attribute_fallb +ack) = @_; if ($attr eq 'perl') { # use some syntax highlighter $content = highlight_perl($content); } else { $content = Parse::BBCode::escape_html($$co +ntent); } "<tt>$content</tt>" }, parse => 0, class => 'block', }, hr => { class => 'block', output => '<hr>', single => 1, }, }, } ); 1;


and parse.pl is located in the dir: /var/www/board/parse.pl where my other forum scripts are running from, I know it's really simple but no internet resource could give me the answer please help me.

Greetings Pr0t0n

In reply to BBCode Parser in configuration file by Pr0t0n

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.