Acme-EdError

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

{
   "abstract" : "implements ed(1) error handling",
   "author" : [
      "Jeremy Mates <jeremy.mates@gmail.com>"
   ],
   "dynamic_config" : 0,
   "generated_by" : "Module::Build version 0.4232",
   "license" : [
      "bsd"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",

META.yml  view on Meta::CPAN

---
abstract: 'implements ed(1) error handling'
author:
  - 'Jeremy Mates <jeremy.mates@gmail.com>'
build_requires:
  Test2::Tools::Command: '0.20'
  Test2::V0: '0.000060'
configure_requires:
  Module::Build: '0.4004'
dynamic_config: 0
generated_by: 'Module::Build version 0.4232, CPAN::Meta::Converter version 2.150010'
license: bsd

README  view on Meta::CPAN

Acme::EdError - ed(1) compatible error messages

this module can be installed using cpanm:

  cpan Acme::EdError

run perldoc(1) on Acme::EdError for more documentation

lib/Acme/EdError.pm  view on Meta::CPAN

# -*- Perl -*-
#
# Implements ed(1) error handling. Run perldoc(1) on this module for
# additional documentation.

package Acme::EdError;

use strict;
use warnings;

require 5.006;

our $VERSION = '9.18';

lib/Acme/EdError.pm  view on Meta::CPAN


END {
    takeover_signals();
}

1;
__END__

=head1 NAME

Acme::EdError - implements ed(1) error handling

=head1 SYNOPSIS

  use Acme::EdError;

  warn "uh oh";
  die  "oh well";

=head1 DESCRIPTION

This module implements L<ed(1)> error handling in perl, eliminating
needless verbosity from warning and error messages. To quote the
L<ed(1)> manual:

  "When an error occurs, ed prints a `?' and either returns to command
  mode or exits if its input is from a script. An explanation of the
  last error can be printed with the `h' (help) command."

Help support has not yet been implemented in this module. (And likely
will not be.)

=head1 SEE ALSO

L<ed(1)>

L<https://thrig.me/src/Acme-EdError.git>

t/1.t  view on Meta::CPAN

use strict;
use warnings;

use Test2::V0;
use Test2::Tools::Command;

local @Test2::Tools::Command::command = ( $^X, '-MAcme::EdError', '-e' );

command { args => ['warn "warning"'], stderr => qr/^\?$/ };
command {
    args         => ['die "error"'],
    munge_status => 1,
    status       => 1,
    stderr       => qr/^\?$/
};

done_testing



( run in 0.738 second using v1.01-cache-2.11-cpan-74e6d1fb12f )