This isn't a question... that's why I'm posting to Meditations. If you're not interested in Perl for win32, then this post may not interest you.
For the rest of you...
An internal project at my company turned up a novel twist to Perl programming (well, novel IMHO, anyway). If this has already been discussed in one form or another, please point me to the discussion thread and forgive me for rehashing it :)
We were developing a "server health monitor" system, which could ping machines, retrieve web pages, ping databases, etc. Tests could be built-in (i.e. part of the suite), or user defined (i.e. the system is extensible).
All tests are query objects (OO-Perl), which ultimately result in an entry in a back-end database for PASS/FAIL.
Okay, that's all well and good.
Now, right from the beginning, we're sitting around thinking, "Y'know, there are a *lot* of products out there that do this, some are $2000+ per license, some are $15.00/mo service contracts. It'd be nice if we could develop a product that we could *sell* to customers. But we'd want to allow them to extend the product with their own user-defined queries, too."
So, that's what we did. Our system can run as pure Perl, *or* it can be compiled with perlapp to be a stand-alone exe.
Here's the beautiful (maybe evil, maybe sexy) part: Users can define their own query classes in a Perl module, and the exe will load it up (you can specify a lib path).
The evil part is, is that (for our system) the user-supplied query must be subclassed from a built-in base class, which is not delivered as Perl code to the end-user. When the exe loads the user's module, the built-in interpreter parses the module and loads it correctly, since the base-class module is already resident in-memory.
More concisely: users may extend the system with user-defined query modules which subclass from a base class that doesn't exist outside of the exe.
That makes testing (or even compiling with perl -c) the end-user module a bit more difficult... but that's beside the point for the moment.
Does anyone else think that it's pretty slick that a perlapp exe can load on-disk perl modules (as cleanly and easily as loading them in straight Perl), and that this mechanism can be used to extend an exe with new functionality?
:)
-Dave
update: per good suggestions in follow-up posts, changed EXE => exe, PERL => Perl
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.