Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Sounded like a "make it flexible" requirement.

The other monks already offered valid advices to heed on.

Suppose you want or need to go ahead. It depending on whether your "modules" are more configuration-like or API-like, there're pretty of real life examples how other people did it.

In either case, XML is increasingly commonly used as a meta-language, instead of self-invented pseudo (markup) language, say, used in some configuration files by some programs.

In Why I like functional programming posted a long while back, it showed you how to use hashes (and functional programming, of course) to set up a series of tag and handler pairs to more conveniently manage the processing of any special tags, HTML or otherwise.

In a "module" framework, the hashes above could be replaced by XML. The definition of a corresponding handler could be some RegEx or Javascript allowed and appropriate.

Microsoft WSC (Windows Script Component) is a nice example, where you can use XML and scripting language to build COMs (which otherwise is not always necessarily an easy task).

Apache itself is another more complicated example, where you could build a module without having to compile the whole thing all over again, considering especially "component model" is not naively part of Unix or Linux by default.

In reply to Re: Best way to 'add modules' to web app? by chunlou
in thread Best way to 'add modules' to web app? by BUU

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (4)
    As of 2017-12-14 03:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What programming language do you hate the most?




















      Results (384 votes). Check out past polls.

      Notices?