summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2012-07-07 21:42:23 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2012-07-07 21:42:23 +0000
commit0636fdea10e6cee703e5e65a997afb41329e3e7d (patch)
tree8083959bc46278a433ac3ac15097e2cf9f2b94c8 /usr.bin
parent729b6219e7802103aba44444deb02e64aadfb110 (diff)
add a dump method, simplifying the --config call
Diffstat (limited to 'usr.bin')
-rwxr-xr-xusr.bin/libtool/libtool14
1 files changed, 10 insertions, 4 deletions
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 <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
@@ -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;
}