1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
Author: Scott M. Dier <sdier@debian.org>
Description: Fixup indentation of POD documentation.
--- a/Tail.pm
+++ b/Tail.pm
@@ -604,12 +604,11 @@
OR, you could use tie (additional parameters can be passed with the name, or
can be set using $ref):
- use File::Tail;
- my $ref=tie *FH,"File::Tail",(name=>$name);
- while (<FH>) {
- print "$_";
- }
-
+ use File::Tail;
+ my $ref=tie *FH,"File::Tail",(name=>$name);
+ while (<FH>) {
+ print "$_";
+ }
Note that the above script will never exit. If there is nothing being written
to the file, it will simply block.
@@ -720,36 +719,35 @@
=item ignore_nonexistant
- Do not complain if the file doesn't exist when it is first
+Do not complain if the file doesn't exist when it is first
opened or when it is to be reopened. (File may be reopened after
resetafter seconds have passed since last data was found.)
=item tail
- When first started, read and return C<n> lines from the file.
+When first started, read and return C<n> lines from the file.
If C<n> is zero, start at the end of file. If C<n> is negative,
return the whole file.
- Default is C<0>.
+Default is C<0>.
=item reset_tail
- Same as tail, but applies after reset. (i.e. after the
+Same as tail, but applies after reset. (i.e. after the
file has been automaticaly closed and reopened). Defaults to
C<-1>, i.e. does not skip any information present in the
file when it first checks it.
- Why would you want it otherwise? I've seen files which
+Why would you want it otherwise? I've seen files which
have been cycled like this:
- grep -v lastmonth log >newlog
- mv log archive/lastmonth
- mv newlog log
- kill -HUP logger
-
+ grep -v lastmonth log >newlog
+ mv log archive/lastmonth
+ mv newlog log
+ kill -HUP logger
Obviously, if this happens and you have reset_tail set to
-c<-1>, you will suddenly get a whole bunch of lines - lines
+C<-1>, you will suddenly get a whole bunch of lines - lines
you already saw. So in this case, reset_tail should probably
be set to a small positive number or even C<0>.
@@ -777,9 +775,9 @@
reference as the first parameter and other parameters to be passed to
handler subroutine, or one of the words:
-return - ignore any error (just put error message in errmsg).
-warn - output the error message but continue
-die - display error message and exit
+ return - ignore any error (just put error message in errmsg).
+ warn - output the error message but continue
+ die - display error message and exit
Default is die.
--- a/Tail.pm.debug
+++ b/Tail.pm.debug
@@ -638,12 +638,11 @@
OR, you could use tie (additional parameters can be passed with the name, or
can be set using $ref):
- use File::Tail;
- my $ref=tie *FH,"File::Tail",(name=>$name);
- while (<FH>) {
- print "$_";
- }
-
+ use File::Tail;
+ my $ref=tie *FH,"File::Tail",(name=>$name);
+ while (<FH>) {
+ print "$_";
+ }
Note that the above script will never exit. If there is nothing being written
to the file, it will simply block.
@@ -754,36 +753,35 @@
=item ignore_nonexistant
- Do not complain if the file doesn't exist when it is first
+Do not complain if the file doesn't exist when it is first
opened or when it is to be reopened. (File may be reopened after
resetafter seconds have passed since last data was found.)
=item tail
- When first started, read and return C<n> lines from the file.
+When first started, read and return C<n> lines from the file.
If C<n> is zero, start at the end of file. If C<n> is negative,
return the whole file.
- Default is C<0>.
+Default is C<0>.
=item reset_tail
- Same as tail, but applies after reset. (i.e. after the
+Same as tail, but applies after reset. (i.e. after the
file has been automaticaly closed and reopened). Defaults to
C<-1>, i.e. does not skip any information present in the
file when it first checks it.
- Why would you want it otherwise? I've seen files which
+Why would you want it otherwise? I've seen files which
have been cycled like this:
- grep -v lastmonth log >newlog
- mv log archive/lastmonth
- mv newlog log
- kill -HUP logger
-
+ grep -v lastmonth log >newlog
+ mv log archive/lastmonth
+ mv newlog log
+ kill -HUP logger
Obviously, if this happens and you have reset_tail set to
-c<-1>, you will suddenly get a whole bunch of lines - lines
+C<-1>, you will suddenly get a whole bunch of lines - lines
you already saw. So in this case, reset_tail should probably
be set to a small positive number or even C<0>.
@@ -811,9 +809,9 @@
reference as the first parameter and other parameters to be passed to
handler subroutine, or one of the words:
-return - ignore any error (just put error message in errmsg).
-warn - output the error message but continue
-die - display error message and exit
+ return - ignore any error (just put error message in errmsg).
+ warn - output the error message but continue
+ die - display error message and exit
Default is die.
|