1: ## get it while it's hot (cause it's not part of wxPerl core yet)
2:
3: #############################################################################
4: ## Name: Carp.pm
5: ## Purpose: Wx::Carp class (a replacement for Carp in Wx applications)
6: ## Author: D.H. aka PodMaster
7: ## Modified by:
8: ## Created: 12/24/2002
9: ## RCS-ID:
10: ## Copyright: (c) 2002 D.H.
11: ## Licence: This program is free software; you can redistribute it and/or
12: ## modify it under the same terms as Perl itself
13: #############################################################################
14:
15: =head1 NAME
16:
17: Wx::Carp - a replacement for Carp in Wx applications
18:
19: =head1 SYNOPSIS
20:
21: Just like L<Carp>, so go see the L<Carp> pod (cause it's based on L<Carp>).
22:
23: # short example
24: use Wx::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::Carp;
40:
41: BEGIN {
42: require Carp;
43: require Wx;
44: }
45:
46: use Exporter;
47: @ISA = qw( Exporter );
48: @EXPORT = qw( confess croak carp );
49: @EXPORT_OK = qw( cluck verbose );
50: @EXPORT_FAIL = qw( verbose ); # hook to enable verbose mode
51:
52: sub export_fail { Carp::export_fail( @_) } # make verbose work for me
53: sub croak { Wx::LogFatalError( Carp::shortmess(@_) ) }
54: sub confess { Wx::LogFatalError( Carp::longmess(@_) ) }
55: sub carp { Wx::LogWarning( Carp::shortmess(@_) ) }
56: sub cluck { Wx::LogWarning( Carp::longmess(@_) ) }
57:
58: 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Wx::Carp - a replacement for Carp in Wx applications
by ibanix (Hermit) on Dec 25, 2002 at 18:25 UTC | |
by PodMaster (Abbot) on Dec 26, 2002 at 04:43 UTC | |
by ibanix (Hermit) on Dec 26, 2002 at 05:50 UTC | |
by PodMaster (Abbot) on Dec 26, 2002 at 06:02 UTC |