From: Stefan Schantl Date: Wed, 17 Feb 2016 11:59:21 +0000 (+0100) Subject: Rename &_initFileposition() to &GetFileposition() and allow to become exported. X-Git-Tag: 2.0~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d91bbb90c9703ee11708bfbde0e5f5a50dcdc29d;p=people%2Fstevee%2Fguardian.git Rename &_initFileposition() to &GetFileposition() and allow to become exported. Signed-off-by: Stefan Schantl --- diff --git a/modules/Base.pm b/modules/Base.pm index f29f543..0b785f1 100644 --- a/modules/Base.pm +++ b/modules/Base.pm @@ -4,7 +4,7 @@ use warnings; use Exporter qw(import); -our @EXPORT_OK = qw(GenerateMonitoredFiles DetectIPProtocolVersion FilePositions); +our @EXPORT_OK = qw(GenerateMonitoredFiles GetFileposition DetectIPProtocolVersion FilePositions); use Net::IP; @@ -107,7 +107,7 @@ sub FilePositions (\%\%) { $new_file_positions{$file} = $current_file_positions{$file}; } else { # Call function to obtain the file position. - my $position = &_initFileposition($file); + my $position = &GetFileposition($file); # Add filename and position to the temporary hash. $new_file_positions{$file} = $position; @@ -189,7 +189,7 @@ sub DetectIPProtocolVersion ($) { } # -## Function for fileposition initialization. +## Function to get the current (EOF) cursor postion. # ## This function is used to get the cursor position of the end of file (EOF) of ## a specified file. @@ -198,7 +198,7 @@ sub DetectIPProtocolVersion ($) { ## with huge logfiles, at initialization time of the worker processes, the file will ## be opened once and the cursor position of the end of file (EOF) get stored. # -sub _initFileposition ($) { +sub GetFileposition ($) { my $file = $_[0]; # Open the file.