From f3d5aa1a5053366795c7a2b5a8aba9b7a4fa7131 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 8 Jul 2015 16:22:31 +0100 Subject: [PATCH] perl functions --- lib/perl/NB/Functions.pm | 42 ---------------------------------------- 1 file changed, 42 deletions(-) diff --git a/lib/perl/NB/Functions.pm b/lib/perl/NB/Functions.pm index 937880ea..24e33792 100644 --- a/lib/perl/NB/Functions.pm +++ b/lib/perl/NB/Functions.pm @@ -168,7 +168,6 @@ our %CHAR_ENTITIES = ( &price_from_to &sec2h &oct2h - &format_amount &mysql_exec &table_get_no_primaries &table_get_primaries @@ -207,7 +206,6 @@ our %CHAR_ENTITIES = ( &db_csv2table &key2id &file_encoding - &http_logs_argv ); #@EXPORT = @EXPORT_OK; @@ -288,25 +286,6 @@ sub oct2h { } -sub format_amount { -#------------------------------------------------------------------------------ -# NB 14.05.09 -#------------------------------------------------------------------------------ -my $amount = shift @_; - if ($amount =~ /\..*,/ - #or $amount =~ /\.\d\d\d/ - ) { - $amount =~ s/\.//g; - $amount =~ s/,/\./g; - } elsif ($amount =~ /,.*\./) { - $amount =~ s/,//g; - } else { - $amount =~ s/,/\./g; - } - return unless $amount =~ /^[\.\d]+$/; -return $amount; -} - sub mysql_exec { #------------------------------------------------------------------------------ # NB 17.03.09 @@ -1241,27 +1220,6 @@ my $encoding = shift; # default value - NB 19.09.11 return $encoding; } -sub http_logs_argv { -#------------------------------------------------------------------------------ -# NB 09.12.10 -#------------------------------------------------------------------------------ -my @logs; -local $_; - - if (@ARGV and @logs = grep {-e $_ or $_ eq '-'} @ARGV) { - - } else { - - @logs = grep{$_} map{chomp($_);$_} `find /var/log/squid3/access*log 2>/dev/null` unless @logs; - - @logs = grep{$_} map{chomp($_);$_} `find /var/log/apache2/access*log 2>/dev/null` unless @logs; - - } - - return @logs; - -} - ############################################################################## 1; ############################################################################## -- 2.47.3