Most-used modules in one-liners

% perl -ne'next unless /^perl/; 
while (/ -[Mm](\w+(?:::\w+)*)(?:\b|=)/g) { $mods{$1}++ } 
END { for (sort {$mods{$b}<=>$mods{$a}} keys %mods) { 
    print "$mods{$_}\t$_\n";
}}'  ~/.bash_history

Here are mine (top 20 on my laptop):

210     L
70      Bench
67      Progress::Any
44      Data::Dump::Color
43      Carp::Always
39      Progress::Any::Output
37      Mojo::DOM
36      File::Slurp
35      Data::Dump
32      Text::ANSI::Util
30      Perinci::Sub::Util
27      SHARYANTO::Package::Util
22      Text::WideChar::Util
21      Time::HiRes
18      JSON
16      Capture::Tiny
16      JSON::XS
16      Test::More
12      Perinci::Sub::GetArgs::Argv
10      Data::Clean::JSON

But actually, I have to say Data::Dump::Color and Log::Any::App are my two most-used, because I have 623 history lines with perl1 alias, and it is defined as: alias perl1='perl -Ilib -MLog::Any::App -MData::Dump::Color'.

What are yours?

Leave a comment

About Steven Haryanto

user-pic A programmer (mostly Perl 5 nowadays). My CPAN ID: SHARYANTO. I'm sedusedan on perlmonks. My twitter is stevenharyanto (but I don't tweet much). Follow me on github: sharyanto.