Acme-Schlong
view release on metacpan or search on metacpan
lib/Acme/Schlong.pm view on Meta::CPAN
# using_tmux
# using_screen
#
# perl_version
# perl_version_is_dev
# directories_in_path
# using_perlbrew
# using_cpanm
# using_cpanm_customized
# using_bash
# using_zsh
# using_ksh
# using_tcsh
# using_csh
# say for glob (dir($self->home_directory) . '/' . '.*');
$self->add_size(10) if $self->using_zsh;
$self->add_size(100) if $self->using_multiplex;
$self->add_size( 100 * $self->cores );
$self->sub_size( 10 * $self->username_length );
$self->abs_size
}
method testdrive {
say "Your Acme Schlong size is: ", $self->size;
say "Your username is: ", $self->username;
say "Your home directory is: ", $self->home_directory;
say "The number of useraccounts is ", $self->useraccounts;
say "Your TERM is ", $self->term;
say "Your shell is ", $self->shell;
say "You are using byobu ", $self->using_byobu;
say "Your username length is ", $self->username_length;
say "You harddrive_size is ", $self->harddrive_size;
say "The number of cores is ", $self->cores;
say "Your perl version is ", $self->perl_version;
# say "Your perl version is a dev_release: ", $self->perl_version_is_dev;
say "You have this many dirs in PATH: ", $self->directories_in_path;
say "You are using a multiplexer: ", $self->using_multiplex;
say "You are using perlbrew: ", $self->using_perlbrew;
say "You are using zsh: ", $self->using_zsh;
say "You are using bash: ", $self->using_bash;
say "You are using cpanm: ", $self->using_cpanm;
say "You are using cpanm customized: ", $self->using_cpanm_customized;
say "You are using Dist::Zilla: ", $self->using_dzil;
say "You have this many perls installed ", $self->perls_installed;
say "Your PAUSE name is ", $self->pause_name;
say "Your number of known hosts is ", $self->known_hosts;
# say "Your number of modules released to the cpan is ", $self->cpan_modules;
}
}
__END__
=pod
=encoding utf-8
=head1 NAME
Acme::Schlong - Fun with Acme::Schlong!
=head1 VERSION
version 0.001
=head1 SYNOPSIS
I remember, years ago, to have found one arcane incantation on the shell to calcuate your schlong size on your Linux box.
I was both amazed and curious and immediately tried it on my system (which happened to be OSX and it didn't work...).
Next, I tried it on the university's computers. It was way too cool.
Then, years later, I have found Perl::Achievements. It's a fun module.
It's a nice go-ahead-and-contribute-module. I wrote Perl::Achievements::Achievement::SchwartzianTransform for the fun of it.
So here is Acme::Schlong. Go ahead, contribute!
BTW: The arcane incantation was:
echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep MHz|awk '{print $4"/30 +";}'; free|grep '^Mem' | awk '{print $3"/1024/3+"}'; df -P -k -x nfs | grep -v 1k | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} ...
=for Pod::Coverage false true
=head1 TODO
=over
=item *
Find good ways to calculate the following:
=back
* number of users logged in on the system (one user with 9 shells is 1 user.)
* harddisk size
* memory used
* swap used
* harddisk free space
* uptime in minutes
* running time in minutes
* average load
=over
=item *
Find good infrastructure so that contributors can:
=back
* easily extend to new metrics
* calculate the new schlong size
* all roles/subclasses are used
( run in 2.664 seconds using v1.01-cache-2.11-cpan-13bb782fe5a )