1GnuPG::Handles(3)     User Contributed Perl Documentation    GnuPG::Handles(3)
2
3
4

NAME

6       GnuPG::Handles - GnuPG handles bundle
7

SYNOPSIS

9         use IO::Handle;
10         my ( $stdin, $stdout, $stderr,
11              $status_fh, $logger_fh, $passphrase_fh,
12            )
13           = ( IO::Handle->new(), IO::Handle->new(), IO::Handle->new(),
14               IO::Handle->new(), IO::Handle->new(), IO::Handle->new(),
15             );
16
17         my $handles = GnuPG::Handles->new
18           ( stdin      => $stdin,
19             stdout     => $stdout,
20             stderr     => $stderr,
21             status     => $status_fh,
22             logger     => $logger_fh,
23             passphrase => $passphrase_fh,
24           );
25

DESCRIPTION

27       GnuPG::Handles objects are generally instantiated to be used in
28       conjunction with methods of objects of the class GnuPG::Interface.
29       GnuPG::Handles objects represent a collection of handles that are used
30       to communicate with GnuPG.
31

OBJECT METHODS

33   Initialization Methods
34       new( %initialization_args )
35           This methods creates a new object.  The optional arguments are
36           initialization of data members.
37
38       hash_init( %args ).
39

OBJECT DATA MEMBERS

41       stdin
42           This handle is connected to the standard input of a GnuPG process.
43
44       stdout
45           This handle is connected to the standard output of a GnuPG process.
46
47       stderr
48           This handle is connected to the standard error of a GnuPG process.
49
50       status
51           This handle is connected to the status output handle of a GnuPG
52           process.
53
54       logger
55           This handle is connected to the logger output handle of a GnuPG
56           process.
57
58       passphrase
59           This handle is connected to the passphrase input handle of a GnuPG
60           process.
61
62       command
63           This handle is connected to the command input handle of a GnuPG
64           process.
65
66       options
67           This is a hash of hashrefs of settings pertaining to the handles in
68           this object.  The outer-level hash is keyed by the names of the
69           handle the setting is for, while the inner is keyed by the setting
70           being referenced.  For example, to set the setting "direct" to true
71           for the filehandle "stdin", the following code will do:
72
73               # assuming $handles is an already-created
74               # GnuPG::Handles object, this sets all
75               # options for the filehandle stdin in one blow,
76               # clearing out all others
77               $handles->options( 'stdin', { direct => 1 } );
78
79               # this is useful to just make one change
80               # to the set of options for a handle
81               $handles->options( 'stdin' )->{direct} = 1;
82
83               # and to get the setting...
84               $setting = $handles->options( 'stdin' )->{direct};
85
86               # and to clear the settings for stdin
87               $handles->options( 'stdin', {} );
88
89           The currently-used settings are as follows:
90
91           direct
92               If the setting "direct" is true for a handle, the GnuPG process
93               spawned will access the handle directly.  This is useful for
94               having the GnuPG process read or write directly to or from an
95               already-opened file.
96

SEE ALSO

98       GnuPG::Interface,
99
100
101
102perl v5.12.0                      2009-07-13                 GnuPG::Handles(3)
Impressum