Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / pperl / carp / Carp.pm
1 #############################################################################
2 ## Name:        ext/pperl/carp/Carp.pm
3 ## Purpose:     Wx::Perl::Carp module (a replacement for Carp in Wx
4 ##              applications)
5 ## Author:      D.H. aka PodMaster
6 ## Modified by:
7 ## Created:     12/24/2002
8 ## RCS-ID:      $Id: Carp.pm 2057 2007-06-18 23:03:00Z mbarbon $
9 ## Copyright:   (c) 2002 D.H.
10 ## Licence:     This program is free software; you can redistribute itand/or
11 ##              modify it under the same terms as Perl itself
12 #############################################################################
13
14 =head1 NAME
15
16 Wx::Perl::Carp  - a replacement for Carp in Wx applications
17
18 =head1 SYNOPSIS
19
20 Just like L<Carp>, so go see the L<Carp> pod (cause it's based on L<Ca
21 +rp>).
22
23     # short example
24     Wx::Perl::Carp;
25     ...
26     carp "i'm warn-ing";
27     croak "i'm die-ing";
28
29 =head1 SEE ALSO
30
31 L<Carp> L<Carp> L<Carp> L<Carp> L<Carp>
32
33 =head1 COPYRIGHT
34
35 (c) 2002 D.H. aka PodMaster (a proud CPAN author)
36
37 =cut
38
39 package Wx::Perl::Carp;
40
41 BEGIN {
42     require Carp;
43     require Wx;
44 }
45
46 use Exporter;
47 $VERSION     = '0.01';
48 @ISA         = qw( Exporter );
49 @EXPORT      = qw( confess croak carp die warn);
50 @EXPORT_OK   = qw( cluck verbose );
51 @EXPORT_FAIL = qw( verbose );              # hook to enable verbose mode
52
53 sub export_fail { Carp::export_fail( @_) } # make verbose work for me
54 sub croak   { Wx::LogFatalError( Carp::shortmess(@_) ) }
55 sub confess { Wx::LogFatalError( Carp::longmess(@_) ) }
56 sub carp    { Wx::LogWarning( Carp::shortmess(@_) ) }
57 sub cluck   { Wx::LogWarning( Carp::longmess(@_) ) }
58 sub warn    { Wx::LogWarning( @_ ) }
59 sub die     { Wx::LogFatalError( @_ ) }
60
61 1;