[Mpls-pm] Dumb Question...Module Method - Dual Name
Gary Vollink
gary.vollink at gmail.com
Thu Oct 20 13:18:18 PDT 2005
O.K., this is for you folks who do modules...
If I have a Module that default exports:
@EXPORT = qw/corvuDbSelect corvuDbRun corvuDbFetch/;
But say, in a more sane OO land, I would want corvuDb dropped...
-----
require corvu::Db;
$mydb = corvu::Db::new();
$mydb->Select($sql);
$mydb->Fetch($sql);
-----
This seems to work so far, but is it the right way...
-----
package corvu::Db;
...
sub Select {
my $self = shift;
# DBD stuff...
# Specific Error Hanlding for me, etc
}
sub corvuDbSelect {
Select ( @_ );
}
-----
Willing to read, but can't find anything that talks about this
directly. Probably don't know what to search for exactly. Guidance
appreciated.
Thanks,
Gary Allen
More information about the Mpls-pm
mailing list