Updated to correctly invoke superclass constructor.
This commit is contained in:
parent
06a417790a
commit
857aeaa179
@ -66,11 +66,8 @@ use constant ADMIN_TYPE => 3; # User type for admin users.
|
|||||||
sub new {
|
sub new {
|
||||||
my $invocant = shift;
|
my $invocant = shift;
|
||||||
my $class = ref($invocant) || $invocant;
|
my $class = ref($invocant) || $invocant;
|
||||||
my $self = {
|
|
||||||
@_,
|
|
||||||
};
|
|
||||||
|
|
||||||
return bless $self, $class;
|
return $class -> SUPER::new(@_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
6
Auth.pm
6
Auth.pm
@ -57,11 +57,7 @@ use AuthMethods;
|
|||||||
sub new {
|
sub new {
|
||||||
my $invocant = shift;
|
my $invocant = shift;
|
||||||
my $class = ref($invocant) || $invocant;
|
my $class = ref($invocant) || $invocant;
|
||||||
my $self = {
|
return $class -> SUPER::new(@_);
|
||||||
@_,
|
|
||||||
};
|
|
||||||
|
|
||||||
return bless $self, $class;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,18 +40,15 @@ use Module::Load;
|
|||||||
sub new {
|
sub new {
|
||||||
my $invocant = shift;
|
my $invocant = shift;
|
||||||
my $class = ref($invocant) || $invocant;
|
my $class = ref($invocant) || $invocant;
|
||||||
my $self = {
|
my $self = $class -> SUPER::new(@_);
|
||||||
@_,
|
|
||||||
};
|
return undef if(!$self);
|
||||||
|
|
||||||
# Ensure that we have objects that we need
|
# Ensure that we have objects that we need
|
||||||
return SystemModule::set_error("cgi object not set") unless($self -> {"cgi"});
|
return SystemModule::set_error("cgi object not set") unless($self -> {"cgi"});
|
||||||
return SystemModule::set_error("dbh object not set") unless($self -> {"dbh"});
|
return SystemModule::set_error("app object not set") unless($self -> {"app"});
|
||||||
return SystemModule::set_error("settings object not set") unless($self -> {"settings"});
|
|
||||||
return SystemModule::set_error("app object not set") unless($self -> {"app"});
|
|
||||||
return SystemModule::set_error("logger object not set") unless($self -> {"logger"});
|
|
||||||
|
|
||||||
return bless $self, $class;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -152,4 +149,3 @@ sub load_method {
|
|||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user