App-DuckPAN
view release on metacpan or search on metacpan
Server: include file info prefix on errors.
If you're not in verbose mode these messages won't make any sense,
otherwise.
Change: a6033af51b634ee7fb1ebc92ceb9d354f4cf688c
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-11-10 13:21:08 +0000
DuckPAN: bold all prefix lines, NOTE -> NOTICE
The intention is to have them stand out a bit, so this should help.
In the old case, it could blend in with the output if the user
happens to be using a chosen color as their base color, since there
aren't any obvious prefixes on the standard output. If people run
with bold all the time, they deserve what they get.
I dunno why I like NOTICE better, but I somehow do. This means
expanding the prefix_width.. which might be moot now that we don't
always prefix.
Change: bcb084170e874ceafd29efb96ea081b295cd87c1
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-11-10 13:10:02 +0000
Server: left-align ProgressBar.
Change: 8d1f8fe951fc4967e981571d47073dd01b20af0f
Author: Zaahir Moolla <moollaza@fastmail.fm>
Date : 2014-11-03 16:24:00 +0000
Updated index
Change: 242ee36cfaf3b08b9bec2fb23691d92dfd1db2cd
Author: Zaahir Moolla <moollaza@fastmail.fm>
Date : 2014-11-03 16:21:18 +0000
better bolding of Codio option
Change: 7acf16dce5ee2e0f01b40e804ace20a9c296bcb3
Author: Zaahir Moolla <moollaza@fastmail.fm>
Date : 2014-11-03 16:19:06 +0000
More updated and a few typo fixes
Change: f16ca0d063682485eabf939d2e6e505d21e8832a
Author: Zaahir Moolla <moollaza@fastmail.fm>
Date : 2014-11-03 16:12:46 +0000
Change: 6d891cde7ed470987bdc938e4b975cd12f54b7b5
Author: moollaza <moollaza@gmail.com>
Date : 2013-09-18 14:44:06 +0000
README - fixed sytax highlighting, removed scary red text
Change: ac33af715ffd1fe3374d9a443f44942d26989401
Author: moollaza <moollaza@gmail.com>
Date : 2013-09-18 14:43:10 +0000
README - fixed bolding
Change: e0faaef10a794b207dd02ac6f5798e3fec8e54d0
Author: moollaza <moollaza@gmail.com>
Date : 2013-09-18 14:42:37 +0000
README - minor fix to login section
Change: 9b7e73caed00a80f22fa5ce0ffa7e83f3804f474
Author: moollaza <moollaza@gmail.com>
Date : 2013-09-18 14:41:28 +0000
lib/App/DuckPAN.pm view on Meta::CPAN
sub emit_info {
my ($self, @msg) = @_;
$self->_print_msg(*STDOUT, '', @msg);
}
sub emit_error {
my ($self, @msg) = @_;
state $prefix = $self->_output_prefix('ERROR', 'red bold');
$self->_print_msg(*STDERR, $prefix, @msg);
}
sub emit_and_exit {
my ($self, $exit_code, @msg) = @_;
state $prefix = $self->_output_prefix('FATAL', 'bright_red bold');
if ($exit_code == 0) { # This is just an info message.
$self->emit_info(@msg);
}
else { # But if it's an unhappy exit
$self->_print_msg(*STDERR, $prefix, @msg);
}
exit $exit_code;
}
lib/App/DuckPAN.pm view on Meta::CPAN
my ($self, @msg) = @_;
return unless $self->verbose; # only show messages in verbose mode.
return $self->_print_msg(*STDOUT, '', @msg);
}
sub emit_notice {
my ($self, @msg) = @_;
state $prefix = $self->_output_prefix('NOTICE', 'yellow bold');
$self->_print_msg(*STDOUT, $prefix, @msg);
}
sub _print_msg {
my ($self, $fh, $prefix, @lines) = @_;
foreach my $line (map { $prefix . $_ } grep { $_ } @lines) {
print $fh $line . "\n";
}
( run in 1.473 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )