diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-07-11 08:33:46 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-07-11 08:33:46 +0000 |
commit | 8707f2814da8ff2bd173ab490382063b44678391 (patch) | |
tree | 95c7d795ad4c7f4d6b2f10b799c6ba9eb8383620 | |
parent | 5a4969b1d3d812d0e1c70bd269edfd124a738668 (diff) |
nit: bless object early so we can use methods on it
-rwxr-xr-x | usr.bin/libtool/libtool | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/libtool/libtool b/usr.bin/libtool/libtool index 17d0ceae26e..881422c630f 100755 --- a/usr.bin/libtool/libtool +++ b/usr.bin/libtool/libtool @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: libtool,v 1.36 2012/07/10 13:32:10 espie Exp $ +# $OpenBSD: libtool,v 1.37 2012/07/11 08:33:45 espie Exp $ # Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> # Copyright (c) 2012 Marc Espie <espie@openbsd.org> @@ -47,14 +47,14 @@ sub new { my $class = shift; # XXX: incomplete - my $self = { + my $self = bless { machine_arch => $Config{ARCH}, ltdir => $ltdir, version => $version, objdir => $ltdir, build_old_libs => 'yes', pic_flags => join(' ', @picflags), - }; + }, $class; ($self->{gnu_arch} = $self->{machine_arch}) =~ s/amd64/x86_64/; if (grep { $_ eq $self->{machine_arch} } qw(m88k vax)) { @@ -65,7 +65,7 @@ sub new $self->{noshared} = 0; } - bless $self, $class; + return $self; } sub noshared |