develooper Front page | perl.perl5.porters | Postings from January 2015

Re: [perl.git] branch blead, updated. v5.21.8-107-g5bf4b3b

Thread Next
From:
Steve Hay
Date:
January 29, 2015 13:41
Subject:
Re: [perl.git] branch blead, updated. v5.21.8-107-g5bf4b3b
Message ID:
CADED=K6CE5Auqv4pp-XGtrJpR8U-G+uEJ82j0X3Ys_7wBmH9WQ@mail.gmail.com
On 29 January 2015 at 01:36, James Keenan <jkeen@verizon.net> wrote:
> In perl.git, the branch blead has been updated
>
> <http://perl5.git.perl.org/perl.git/commitdiff/5bf4b3bf13bc4055684a48448b05920845ef7764?hp=1a43aa034207579c7b9e27eceda85687707c5c86>
>
> - Log -----------------------------------------------------------------
> commit 5bf4b3bf13bc4055684a48448b05920845ef7764
> Author: Lajos Veres <vlajos@gmail.com>
> Date:   Wed Jan 28 20:35:53 2015 -0500
>
>     Corrections to spelling and grammatical errors.
>
>     Extracted from patch submitted by Lajos Veres in RT #123693.
> -----------------------------------------------------------------------
[...]
>
> diff --git a/dist/Tie-File/lib/Tie/File.pm b/dist/Tie-File/lib/Tie/File.pm
> index df8a197..1f71531 100644
> --- a/dist/Tie-File/lib/Tie/File.pm
> +++ b/dist/Tie-File/lib/Tie/File.pm
> @@ -7,14 +7,14 @@ use Fcntl 'O_CREAT', 'O_RDWR', 'LOCK_EX', 'LOCK_SH', 'O_WRONLY', 'O_RDONLY';
>  sub O_ACCMODE () { O_RDONLY | O_RDWR | O_WRONLY }
>
>
> -$VERSION = "1.01";
> +$VERSION = "1.02";
>  my $DEFAULT_MEMORY_SIZE = 1<<21;    # 2 megabytes
> -my $DEFAULT_AUTODEFER_THRESHHOLD = 3; # 3 records
> -my $DEFAULT_AUTODEFER_FILELEN_THRESHHOLD = 65536; # 16 disk blocksful
> +my $DEFAULT_AUTODEFER_THRESHOLD = 3; # 3 records
> +my $DEFAULT_AUTODEFER_FILELEN_THRESHOLD = 65536; # 16 disk blocksful
>
>  my %good_opt = map {$_ => 1, "-$_" => 1}
>                   qw(memory dw_size mode recsep discipline
> -                    autodefer autochomp autodefer_threshhold concurrent);
> +                    autodefer autochomp autodefer_threshold concurrent);
>
>  sub TIEARRAY {
>    if (@_ % 2 != 0) {
> @@ -62,10 +62,10 @@ sub TIEARRAY {
>    $opts{autodefer} = 1 unless defined $opts{autodefer};
>    $opts{autodeferring} = 0;     # but is not initially active
>    $opts{ad_history} = [];
> -  $opts{autodefer_threshhold} = $DEFAULT_AUTODEFER_THRESHHOLD
> -    unless defined $opts{autodefer_threshhold};
> -  $opts{autodefer_filelen_threshhold} = $DEFAULT_AUTODEFER_FILELEN_THRESHHOLD
> -    unless defined $opts{autodefer_filelen_threshhold};
> +  $opts{autodefer_threshold} = $DEFAULT_AUTODEFER_THRESHOLD
> +    unless defined $opts{autodefer_threshold};
> +  $opts{autodefer_filelen_threshold} = $DEFAULT_AUTODEFER_FILELEN_THRESHOLD
> +    unless defined $opts{autodefer_filelen_threshold};
>

I agree with Tony's comment that these and other changes to Tie-File
could break backwards compatibility. The keys of %opt are passed in
from user code, so we can't change the expected key from
"autodefer_threshhold" to "autodefer_threshold" without also asking
users to change their code, which is probably more hassle than it's
worth.

Strictly speaking, I don't see the particular keys in question
documented, but it's still possible that some brave (unwise) soul is
using them and I don't think it's worth breaking even undocumented
things just for the sake of a typo.

So I think these parts should be reverted.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About