exilepanda has asked for the wisdom of the Perl Monks concerning the following question:
use ManVideo; my $mv = new ManVideo( DB => $dbhRef ); $mv -> newVideoRecord ( Trainer => "someone", Year => 2011, VideoType +=> "training" ); $mv -> save();
And now, my next task is almost the same, and yet identical , but this time is for audio. So I may use the same framework, by giving different DB handle. However, although I can completely use ManVideo::* to do the job, however this is odd to use the same interface to write my source code for Audio like this : $audio = newVideoRecord ( ... )
So, is there any simple (and safe) hack, so that I can create another module set, namely ManAudio, looks like :
my $aud = new ManAudio; $aud -> newAudioRecord( ..., AudioType => "meeting" ) ;# implement by +ManVideo::newVideoRecord;
Thank you very much in advance for any clues.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module ( method ) alias ?
by Anonymous Monk on Oct 04, 2012 at 05:36 UTC | |
by exilepanda (Friar) on Oct 04, 2012 at 07:04 UTC | |
by Anonymous Monk on Oct 04, 2012 at 07:43 UTC | |
by exilepanda (Friar) on Oct 04, 2012 at 22:13 UTC | |
|
Re: Module ( method ) alias ?
by NetWallah (Canon) on Oct 04, 2012 at 05:36 UTC | |
|
Re: Module ( method ) alias ?
by scorpio17 (Canon) on Oct 04, 2012 at 13:32 UTC |