a method ->disable that does something nice to the display, and stops
the progress meter right before we display our first real error.
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.113 2014/09/21 07:53:19 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.114 2014/12/22 14:24:56 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
my $self = shift;
my $msg = shift;
$self->{bad}++;
+ $self->progress->disable;
$self->errsay("Error: $msg", @_);
}
# ex:ts=8 sw=4:
-# $OpenBSD: ProgressMeter.pm,v 1.44 2014/11/30 15:56:15 espie Exp $
+# $OpenBSD: ProgressMeter.pm,v 1.45 2014/12/22 14:24:56 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
}
}
+sub disable {}
+
sub new_sizer
{
my ($progress, $plist, $state) = @_;
sub clear {}
+
sub show {}
sub working {}
# ex:ts=8 sw=4:
-# $OpenBSD: Term.pm,v 1.28 2014/07/08 17:02:56 espie Exp $
+# $OpenBSD: Term.pm,v 1.29 2014/12/22 14:24:56 espie Exp $
#
# Copyright (c) 2004-2007 Marc Espie <espie@openbsd.org>
#
delete $self->{stars};
}
+sub disable
+{
+ my $self = shift;
+ print "\n" if length($self->{lastdisplay}) > 0;
+
+ bless $self, "OpenBSD::ProgressMeter::Stub";
+}
+
sub next
{
my ($self, $todo) = @_;