Possible Duplicate:
Why do you have to put a 1; at the end of a Perl 5 module?
From this page Perl::Critic::Policy::Subroutines::RequireFinalReturn, this is a code sample
package Password;
# every time the user guesses the password wrong, its value
# is rotated by one character
my $password;
sub set_password {
$password = shift;
}
sub check_password {
my $guess = shift;
if ($guess eq $password) {
unlock_secrets();
} else {
$password = (substr $password, 1).(substr $password, 0, 1);
}
}
1;
- Why is a
1;
used at the end? What does that statement signify to the compiler?