diff options
author | rillig <rillig@pkgsrc.org> | 2005-08-01 22:29:13 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-08-01 22:29:13 +0000 |
commit | ddc2bad236d79079687d4d8e123e84c456ed56a6 (patch) | |
tree | dcb36fc68570f2d486416b304e386cd7bbfe8dbd /pkgtools | |
parent | 355389313611ba413994524c01054a1e3ea044b9 (diff) | |
download | pkgsrc-ddc2bad236d79079687d4d8e123e84c456ed56a6.tar.gz |
Converted PkgLint::FileUtils::Line to use an array instead of a hash for
saving the fields. This gives a 5 percent speed-up.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index b978a0de2d0..af87c746de9 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.224 2005/08/01 21:28:06 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.225 2005/08/01 22:29:13 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -190,21 +190,21 @@ package PkgLint::FileUtil::Line; #========================================================================== sub new($$$$) { my ($class, $file, $lineno, $text) = @_; - my ($self) = ({}); + my ($self) = ([]); bless($self, $class); - $self->{"file"} = $file; - $self->{"lineno"} = $lineno; - $self->{"text"} = $text; + $self->[0] = $file; + $self->[1] = $lineno; + $self->[2] = $text; return $self; } sub file($) { - return shift(@_)->{"file"}; + return shift(@_)->[0]; } sub lineno($) { - return shift(@_)->{"lineno"}; + return shift(@_)->[1]; } sub text($) { - return shift(@_)->{"text"}; + return shift(@_)->[2]; } sub log_error($$) { |