Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 37 lines (32 sloc) 824 Bytes
#!/usr/bin/env perl
# Pragmas.
use strict;
use warnings;
# Modules.
use Error::Pure::Output::Text qw(err_line);
# Fictional error structure.
my $err_hr = {
'msg' => [
'FOO',
'BAR',
],
'stack' => [
{
'args' => '(2)',
'class' => 'main',
'line' => 1,
'prog' => 'script.pl',
'sub' => 'err',
}, {
'args' => '',
'class' => 'main',
'line' => 20,
'prog' => 'script.pl',
'sub' => 'eval {...}',
}
],
};
# Print out.
print err_line($err_hr);
# Output:
# #Error [script.pl:1] FOO
Jump to Line
Something went wrong with that request. Please try again.