Good suggestion, though I'm actually checking for that in the sub that gets the classname from the database. If the query returns nothing, it errors out. Defining the names in the database is at least as reliable as putting them in an array, I think. Since I
use all of the widgets at the top, that should catch any potential mistakes in the db.
I'm curious to know if there is a way to get around useing them though -- I would ideally like to be able to add widgets by simply:
1) add the class module to the directory
2) add the class name to the database
The above sub resides in a module running on mod_perl, so every time I change it, I have to stop and restart the http server, which I'd rather not have to do. Of course, I realize there are some stability problems that could arise when doing this sort of thing.
joecamel
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.