SPUG: Perl logic module?
Colin Meyer
cmeyer at helvella.org
Tue Mar 23 15:25:35 CST 2004
On Tue, Mar 23, 2004 at 11:51:42AM -0800, Brian Hatch wrote:
>
>
> I want to write something that can handle some standard logic command
> line arguments. Think tcpdump args, for example. So I'd supply
> subroutines (or whatever's required) that can return true/false, and
> have some perl module stick them together in the correct dynamic order,
> as requested by the user.
>
> For example, if I want to do something to a bunch of hosts depending
> on the criteria specified
>
> do_something -os linux -and ( -location seattle -o -purpose webserver)
>
>
> So I'd provide subs/etc for 'os', 'loc'tion' and 'purpose' and it'd call
> them as appropriate for each thing (host in the above case) to give me
> a grand 'true/false' when all's said and done.
>
> Anyone know of something like this?
find2perl does a similar sort of option processing. Unfortunately, it
seems that the processing is located directly in the program, and is not
abstracted into a module.
-Colin.
More information about the spug-list
mailing list