deadpool42
Programmer
- May 24, 2004
- 40
I've decided to write a simple perl module as an interface to forum software written in php. Basically, I just want to be give the script access to a few functions through an object-oriented interface. Here's what I've gathered so far from the perl documentation:
Is anything missing? Also, won't using new as the name of the constructor subroutine cause conflicts with other modules?
Code:
BEGIN {
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK);
@ISA = qw(Exporter);
@EXPORT = qw(new);
@EXPORT_OK = qw();
}
sub new {
my $this = shift;
my $class = ref($this) || $this;
my $self = {};
bless $self, $class;
return $self;
}
Is anything missing? Also, won't using new as the name of the constructor subroutine cause conflicts with other modules?