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

NAME

6       CPANPLUS::Error - error handling for CPANPLUS
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       Records a message on the stack, and prints it to "STDOUT" (or actually
18       $MSG_FH, see the "GLOBAL VARIABLES" section below), if the "VERBOSE"
19       option is true.  The "VERBOSE" option defaults to false.
20
21   msg()
22       An alias for "cp_msg".
23
24   cp_error("error string" [,VERBOSE])
25       Records an error on the stack, and prints it to "STDERR" (or actually
26       $ERROR_FH, see the "GLOBAL VARIABLES" sections below), if the "VERBOSE"
27       option is true.  The "VERBOSE" options defaults to true.
28
29   error()
30       An alias for "cp_error".
31

CLASS METHODS

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

GLOBAL VARIABLES

50       $ERROR_FH
51           This is the filehandle all the messages sent to "error()" are being
52           printed. This defaults to *STDERR.
53
54       $MSG_FH
55           This is the filehandle all the messages sent to "msg()" are being
56           printed. This default to *STDOUT.
57
58
59
60perl v5.36.0                      2022-07-22                CPANPLUS::Error(3)
Impressum