in reply to Similar plugins run serially

If it were me I'd write a class for each manner of scanning. Then your script can use the appropriate classes(you could have this be based upon a config file if you want), which register themselves with a base class. Scanning then simply requires the base class to try each of the registered sub-classes.

--
perl -wpe "s/\b;([mnst])/'$1/g"

Replies are listed 'Best First'.
Re: Re: Similar plugins run serially
by gomez18 (Sexton) on Nov 01, 2002 at 23:39 UTC
    This sounds like exactly what I want but I'm not sure on how to do the registration part. Any hints on that?

    An 8 bit man in a 32 bit world.

      The &import for each subclass could call some method of the baseclass eg; &register. register would determine it's caller and add the subclass name to some internal list; over which you later iterate calling scan.

      --
      perl -wpe "s/\b;([mnst])/'$1/g"