in reply to Re: Potental project - Perl Beads?
in thread Potential project - Perl Beads?
This isn't a problem in perl thanks to numerous ways to introspect a module after loading.
As for examples, let me try to give a couple. Let's say you wanted a stock quote off a certain web page out of the rest of the junk on the page. Sure, this is a breeze in straightforward perl, but the idea with Beads is that you can put this together without knowing the language to any great extent. So the connection in Beads would be something like:
Note that the beads should be sufficiently reusable.ConstantBead : Stores the URL | V HTMLRetriverBead : Retrived the value from the input | : bead and returns the text of the | : HTML page that it refers to V LineMatcherBead : Given a multiline text document, | : return all lines that match a given | : pattern V TokerizerBead : Given a line, returns text that | : matches a given pattern V OutputBead : Prints input text to screen.
As another example, let's say I wanted to make a web page of thumbnails from a directory of images. Here's a possible Bead string for that:
Here, I hopefully demonstrate that data sent through beads would need to have synchorization; here, SaveImageBead would wait until it has both inputs from data that was generated by LineMatcherBead, and HTMLTableGeneratorBead would also wait for the same. Note that this means that some beads would run in a threaded environment, while others would be 'batch' operations.ConstantBead | V DirectoryListingBead | V LineMatcherBead : limit to just .jpg | \ \___________________________ | \_________ \ V \ | LoadImageBead | | | | FileProperties Bead V V | ResizeImageBead StringModifierBead | | | :("<>-thumb.jpg") | V | | SaveImageBead <---------/ / / / / Value Bead HTMLTableGeneratorBead <------------/ :get size | V OutputBead
Again, these examples are easy enough to do in straightforward perl but what I'm aiming for is a way for those not familar with programming or scripting to have a solution to put together advanced 'scripts' without help. While XBeans, the JAva solution, will probably work too, using perl means that you avoid the overhead of instaniting a Java environment, you are probably insured of it working without the installation of additional packages on most *NIX installs, and that adding to the system by third parties should be much simpler than adding to it via Java.
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Potental project - Perl Beads?
by suaveant (Parson) on Sep 24, 2001 at 17:44 UTC | |
|
Re (tilly) 3: Potental project - Perl Beads?
by tilly (Archbishop) on Sep 24, 2001 at 17:41 UTC | |
by Masem (Monsignor) on Sep 24, 2001 at 18:13 UTC |