Error-Show

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

      }
      catch($e){
        say STDERR context $e;
      }

DESCRIPTION
    This module provides three tools/modes to help locate and diagnose
    errors in your Perl programs.

  Command Line
    From the command line this module transparently executes your
    syntactically correct program. No code changes are required. However in
    the case of syntax errors (or warnings if desired), it extracts context
    (lines of code) surrounding them. The lines are prefixed with numbers
    and the nicely formatted context is dumped on STDERR for you to see the
    error or your ways.

    The resulting output is optionally filtered seamlessly through the
    splain program (see diagnostics), giving more information on why the
    reported syntax errors and warnings might have occurred.

README  view on Meta::CPAN


    "From v0.2.0:", Added 'advanced string eval' support has been added for
    better context reporting of dynamically generated code.

USAGE
  Command Line Usage (Syntax check and Exception Catching)
            perl -MError::Show  [options] file.pl

    When included in a command line switch to Perl, "-MError::Show" syntax
    checks the input program. If the syntax is OK, normal execution
    continues in a transparent fashion. Otherwise, detailed code context
    surrounding the source of the error is generated and printed on STDERR.

    From v0.4.0 a global __DIE__ handler is also installed, which will catch
    any stray exceptions during execution and present a line numbered
    summary stack trace. Programs a free to overload this handler. However
    the features of this module will be lost.

    NOTE: It is important that it's the first "-M" switch for this module to
    operate correctly and to prevent any incompatibilities withe global
    signal handlers.

README.md  view on Meta::CPAN


```

# DESCRIPTION

This module provides three tools/modes to help locate and diagnose errors in
your Perl programs.

## Command Line

From the command line this module transparently executes your syntactically
correct program. No code changes are required. However in the case of syntax
errors (or warnings if desired), it extracts context (lines of code)
surrounding them. The lines are prefixed with numbers  and the nicely formatted
context is dumped on STDERR for you to see the error or your ways.

The resulting output is optionally filtered seamlessly through the **splain**
program (see [diagnostics](https://metacpan.org/pod/diagnostics)), giving more information on why the reported
syntax errors and warnings might have occurred. 

## In Program Exception Context

README.md  view on Meta::CPAN

# USAGE

## Command Line Usage (Syntax check and Exception Catching)

```
    perl -MError::Show  [options] file.pl 
```

When included in a command line switch to Perl, `-MError::Show` syntax checks
the input program. If the syntax is OK, normal execution continues in a
transparent fashion.  Otherwise, detailed code context surrounding the source
of the error is generated and printed on STDERR.

**From v0.4.0** a global \_\_DIE\_\_ handler is also installed, which will catch any
stray exceptions during execution and present a line numbered summary stack
trace. Programs a free to overload this handler. However the features of this
module will be lost.

**NOTE:** It is important that it's the first `-M` switch for this module to
operate correctly and to prevent any incompatibilities withe global signal
handlers.

lib/Error/Show.pod  view on Meta::CPAN




=head1 DESCRIPTION

This module provides three tools/modes to help locate and diagnose errors in
your Perl programs.

=head2 Command Line

From the command line this module transparently executes your syntactically
correct program. No code changes are required. However in the case of syntax
errors (or warnings if desired), it extracts context (lines of code)
surrounding them. The lines are prefixed with numbers  and the nicely formatted
context is dumped on STDERR for you to see the error or your ways.

The resulting output is optionally filtered seamlessly through the B<splain>
program (see L<diagnostics>), giving more information on why the reported
syntax errors and warnings might have occurred. 

=head2 In Program Exception Context

lib/Error/Show.pod  view on Meta::CPAN



=head1 USAGE

=head2 Command Line Usage (Syntax check and Exception Catching)

	perl -MError::Show  [options] file.pl 

When included in a command line switch to Perl, C<-MError::Show> syntax checks
the input program. If the syntax is OK, normal execution continues in a
transparent fashion.  Otherwise, detailed code context surrounding the source
of the error is generated and printed on STDERR.

B<From v0.4.0> a global __DIE__ handler is also installed, which will catch any
stray exceptions during execution and present a line numbered summary stack
trace. Programs a free to overload this handler. However the features of this
module will be lost.

B<NOTE:> It is important that it's the first C<-M> switch for this module to
operate correctly and to prevent any incompatibilities withe global signal
handlers.



( run in 0.369 second using v1.01-cache-2.11-cpan-0a6323c29d9 )