0: ## get it while it's hot (cause it's not part of wxPerl core yet)
1:
2: #############################################################################
3: ## Name: Carp.pm
4: ## Purpose: Wx::Carp class (a replacement for Carp in Wx applications)
5: ## Author: D.H. aka PodMaster
6: ## Modified by:
7: ## Created: 12/24/2002
8: ## RCS-ID:
9: ## Copyright: (c) 2002 D.H.
10: ## Licence: This program is free software; you can redistribute it and/or
11: ## modify it under the same terms as Perl itself
12: #############################################################################
13:
14: =head1 NAME
15:
16: Wx::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<Carp>).
21:
22: # short example
23: use Wx::Carp;
24: ...
25: carp "i'm warn-ing";
26: croak "i'm die-ing";
27:
28: =head1 SEE ALSO
29:
30: L<Carp> L<Carp> L<Carp> L<Carp> L<Carp>
31:
32: =head1 COPYRIGHT
33:
34: (c) 2002 D.H. aka PodMaster (a proud CPAN author)
35:
36: =cut
37:
38: package Wx::Carp;
39:
40: BEGIN {
41: require Carp;
42: require Wx;
43: }
44:
45: use Exporter;
46: @ISA = qw( Exporter );
47: @EXPORT = qw( confess croak carp );
48: @EXPORT_OK = qw( cluck verbose );
49: @EXPORT_FAIL = qw( verbose ); # hook to enable verbose mode
50:
51: sub export_fail { Carp::export_fail( @_) } # make verbose work for me
52: sub croak { Wx::LogFatalError( Carp::shortmess(@_) ) }
53: sub confess { Wx::LogFatalError( Carp::longmess(@_) ) }
54: sub carp { Wx::LogWarning( Carp::shortmess(@_) ) }
55: sub cluck { Wx::LogWarning( Carp::longmess(@_) ) }
56:
57: 1;
In reply to Wx::Carp - a replacement for Carp in Wx applications by PodMaster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |