I'm refactoring a perl module in legacy code, and this is a function from the module:
sub get_user {
my $user = __PACKAGE__->{user};
if (!defined $user) {
# more code
__PACKAGE__->{user} = $user;
}
return $user;
}
This module compiles under use strict
. And there's no package variables defined.
What does __PACKAGE__->{user}
mean?