X-Git-Url: http://git.ieval.ro/?p=nethack-naodash.git;a=blobdiff_plain;f=lib%2FApp%2FNAOdash.pm;h=d6df6bef999c6238b71c7a65bff732aa4d436912;hp=f80a0fd0e60f397e628789e71d659dd692341ce4;hb=0fb1f8591637289626b42288e453675a3dded96c;hpb=88d87be7ecae3db02a2585ed856a542530f33f6f diff --git a/lib/App/NAOdash.pm b/lib/App/NAOdash.pm index f80a0fd..d6df6be 100644 --- a/lib/App/NAOdash.pm +++ b/lib/App/NAOdash.pm @@ -6,7 +6,7 @@ use warnings; use re '/saa'; use utf8; -our $VERSION = '0.001'; +our $VERSION = '0.002'; use Encode qw/encode/; use File::Slurp; @@ -94,12 +94,12 @@ EOF } sub run { - my ($user_or_path) = @_; + my ($args, $user_or_path) = @_; my $stats; if ($user_or_path =~ /^\w+$/) { # Looks like a user - $stats = naodash_user $user_or_path + $stats = naodash_user $args, $user_or_path } else { - $stats = naodash_xlog read_file $user_or_path + $stats = naodash_xlog $args, read_file $user_or_path } print encode 'UTF-8', naodash_to_ansi $stats ## no critic (RequireCheckedSyscalls) } @@ -130,8 +130,8 @@ It defines two functions: =item B(I<$stats>) Takes the result of B or B and presents it -in a text form, using ANSI color escape sequences and unicode ticks -(✓) and X marks (✗) to indicate the presence/absence of checks. +in a text form, using ANSI escape sequences to indicate the +presence/absence of checks. =item B(I<$user_or_path>)