Acme-Schlong
view release on metacpan or search on metacpan
lib/Acme/Schlong.pm view on Meta::CPAN
# has number of files in ~/.emacs.d
# has using .ssh/config
# has rvm/rbenv installed
#
# has number_of_modules => ( is => 'ro', isa => Int, lazy_build => 1, documentation => q{} );
method _build_useraccounts { scalar grep { !/Shared/ } grep { -d $_ } glob ( dir( $self->home_directory => '..') . '/*'); } #TODO Make safer for WIN
method _build_username_length { length $self->username }
method _build_shell { $_ = $ENV{SHELL}; s/.*\/(.*?)$/$1/; $_ } # /r
method _build_harddrive_size { $_=`df -l | grep '\\/\$' | awk '{print \$2}'`; chomp; $_ } # -E 'use IPC::Run qw<run timeout>; my $out; my @cmd = (q<du>, q<-s>, q</>); run \@cmd, "", \undef, \$out, timeout( 100 ) echo `uptime|grep days|sed...
method _build_harddrive_used { $_=`df -l | grep '\\/\$' | awk '{print \$3}'`; chomp; $_ } # -E 'use IPC::Run qw<run timeout>; my $out; my @cmd = (q<du>, q<-s>, q</>); run \@cmd, "", \undef, \$out, timeout( 100 ) echo `uptime|grep days|sed...
method _build_uptime { 100 }
method _build_users { 5 }
method _build_cores { App::OS::Detect::MachineCores->new->cores }
method _build_using_multiplex { $self->using_byobu or $self->using_tmux or $self->using_screen ? true : false }
method _build_using_byobu { exists $ENV{BYOBU_BACKEND} ? 1 : 0 }
method _build_using_tmux { $ENV{TERM} ~~ 'tmux' ? 1 : 0 }
method _build_using_screen { $ENV{TERM} ~~ 'screen' ? 1 : 0 }
method _build_perl_version { $_ = `$^X --version`; m/perl.*\((?<vstring>v\d\.\d+.\d+)\) built for.*/; $+{vstring} }
# method _build_perl_version_is_dev { version->new($self->perl_version)->version->[1] % 2 ? 1 : 0 } # is_alpha
method _build_directories_in_path { scalar split q<:> => $ENV{PATH} }
( run in 2.845 seconds using v1.01-cache-2.11-cpan-e1769b4cff6 )