From 0636fdea10e6cee703e5e65a997afb41329e3e7d Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sat, 7 Jul 2012 21:42:23 +0000 Subject: add a dump method, simplifying the --config call --- usr.bin/libtool/libtool | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/libtool/libtool b/usr.bin/libtool/libtool index dd56565fbf4..5e17c21fb64 100755 --- a/usr.bin/libtool/libtool +++ b/usr.bin/libtool/libtool @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: libtool,v 1.19 2012/07/07 21:29:14 espie Exp $ +# $OpenBSD: libtool,v 1.20 2012/07/07 21:42:22 jasper Exp $ # Copyright (c) 2007-2010 Steven Mestdagh # Copyright (c) 2012 Marc Espie @@ -54,6 +54,14 @@ sub new bless $self, $class; } +sub dump +{ + my $self = shift; + while (my ($key, $value) = each(%$self)) { + print "$key = $value\n"; + } +} + package LT::Mode; sub new @@ -352,9 +360,7 @@ sub notyet sub config { - while ( my ($key, $value) = each(%$ltconfig) ) { - print "$key = $value\n"; - } + $ltconfig->dump; exit 0; } -- cgit v1.2.3