in reply to use slack;
and test code:package myObj; use strict; sub new { return bless {}, $_[0]; } sub one { print "One\n"; } sub two { print "Two\n"; } sub three { print "Three\n"; } 1;
HTH#!/usr/bin/perl -w use strict; use lib "."; use myObj; my $s = myObj->new(); my @cmd = qw( one two three ); foreach (@cmd) { $s->$_(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: use slack;
by epoptai (Curate) on Dec 22, 2000 at 03:15 UTC |