1CPANPLUS::Error(3)    User Contributed Perl Documentation   CPANPLUS::Error(3)
2
3
4

NAME

6       CPANPLUS::Error
7

SYNOPSIS

9           use CPANPLUS::Error qw[cp_msg cp_error];
10

DESCRIPTION

12       This module provides the error handling code for the CPANPLUS
13       libraries, and is mainly intended for internal use.
14

FUNCTIONS

16       cp_msg("message string" [,VERBOSE])
17
18       Records a message on the stack, and prints it to "STDOUT" (or actually
19       $MSG_FH, see the "GLOBAL VARIABLES" section below), if the "VERBOSE"
20       option is true.  The "VERBOSE" option defaults to false.
21
22       msg()
23
24       An alias for "cp_msg".
25
26       cp_error("error string" [,VERBOSE])
27
28       Records an error on the stack, and prints it to "STDERR" (or actually
29       $ERROR_FH, see the "GLOBAL VARIABLES" sections below), if the "VERBOSE"
30       option is true.  The "VERBOSE" options defaults to true.
31
32       error()
33
34       An alias for "cp_error".
35

CLASS METHODS

37       CPANPLUS::Error->stack()
38
39       Retrieves all the items on the stack. Since "CPANPLUS::Error" is imple‐
40       mented using "Log::Message", consult its manpage for the function
41       "retrieve" to see what is returned and how to use the items.
42
43       CPANPLUS::Error->stack_as_string([TRACE])
44
45       Returns the whole stack as a printable string. If the "TRACE" option is
46       true all items are returned with "Carp::longmess" output, rather than
47       just the message.  "TRACE" defaults to false.
48
49       CPANPLUS::Error->flush()
50
51       Removes all the items from the stack and returns them. Since "CPAN‐
52       PLUS::Error" is  implemented using "Log::Message", consult its manpage
53       for the function "retrieve" to see what is returned and how to use the
54       items.
55

GLOBAL VARIABLES

57       $ERROR_FH
58           This is the filehandle all the messages sent to "error()" are being
59           printed. This defaults to *STDERR.
60
61       $MSG_FH
62           This is the filehandle all the messages sent to "msg()" are being
63           printed. This default to *STDOUT.
64
65
66
67perl v5.8.8                       2007-03-31                CPANPLUS::Error(3)
Impressum