Acme-PricelessMethods
view release on metacpan or search on metacpan
lib/Acme/PricelessMethods.pm view on Meta::CPAN
package Acme::PricelessMethods;
use 5.006;
use warnings;
use strict;
our $VERSION = '0.01';
# ###### Implementation ###########
sub new {
my $self = shift;
my $object = { universe => 1 };
return bless $object, $self;
}
sub is_perl_installed {
my $self = shift;
# let's check if perl is somewhere around here...
return 1 if defined $^X;
}
sub is_machine_on {
my $self = shift;
# indeed, it won't return the proper 1,
# but hey, it's the thought that counts
return 1 if return 1;
}
sub universe_still_exists {
my $self = shift;
# check if universe still exists
return 1 if defined $self->{'universe'};
}
sub is_program_running {
my $self = shift;
# we're assuming that if the version of the interpreter is defined,
# it's for a good reason
return 1 if defined $^V;
}
sub is_time_moving_forward {
my $self = shift;
# time probably is moving forward, but one can never be too sure
my $before = time;
sleep 2;
my $after = time;
return $after - $before;
}
sub is_true_true {
my $self = shift;
# if 1 is true, we return 1
if (1) {
return 1;
}
# if 1 is not true, we return false, which is 1
else {
return 1;
}
}
1; # Magic true value required at end of module
__END__
( run in 2.875 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )