.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GnuPG::Handles 3" .TH GnuPG::Handles 3 2024-09-01 "perl v5.40.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME GnuPG::Handles \- GnuPG handles bundle .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 7 \& use IO::Handle; \& my ( $stdin, $stdout, $stderr, \& $status_fh, $logger_fh, $passphrase_fh, \& ) \& = ( IO::Handle\->new(), IO::Handle\->new(), IO::Handle\->new(), \& IO::Handle\->new(), IO::Handle\->new(), IO::Handle\->new(), \& ); \& \& my $handles = GnuPG::Handles\->new \& ( stdin => $stdin, \& stdout => $stdout, \& stderr => $stderr, \& status => $status_fh, \& logger => $logger_fh, \& passphrase => $passphrase_fh, \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" GnuPG::Handles objects are generally instantiated to be used in conjunction with methods of objects of the class GnuPG::Interface. GnuPG::Handles objects represent a collection of handles that are used to communicate with GnuPG. .SH "OBJECT METHODS" .IX Header "OBJECT METHODS" .SS "Initialization Methods" .IX Subsection "Initialization Methods" .ie n .IP "new( \fR\fI%initialization_args\fR\fI\fR )" 4 .el .IP "new( \fR\f(CI%initialization_args\fR\fI\fR )" 4 .IX Item "new( %initialization_args )" This methods creates a new object. The optional arguments are initialization of data members. .ie n .IP "hash_init( \fR\fI%args\fR\fI\fR )." 4 .el .IP "hash_init( \fR\f(CI%args\fR\fI\fR )." 4 .IX Item "hash_init( %args )." .SH "OBJECT DATA MEMBERS" .IX Header "OBJECT DATA MEMBERS" .PD 0 .IP stdin 4 .IX Item "stdin" .PD This handle is connected to the standard input of a GnuPG process. .IP stdout 4 .IX Item "stdout" This handle is connected to the standard output of a GnuPG process. .IP stderr 4 .IX Item "stderr" This handle is connected to the standard error of a GnuPG process. .IP status 4 .IX Item "status" This handle is connected to the status output handle of a GnuPG process. .IP logger 4 .IX Item "logger" This handle is connected to the logger output handle of a GnuPG process. .IP passphrase 4 .IX Item "passphrase" This handle is connected to the passphrase input handle of a GnuPG process. .IP command 4 .IX Item "command" This handle is connected to the command input handle of a GnuPG process. .IP options 4 .IX Item "options" This is a hash of hashrefs of settings pertaining to the handles in this object. The outer-level hash is keyed by the names of the handle the setting is for, while the inner is keyed by the setting being referenced. For example, to set the setting \f(CW\*(C`direct\*(C'\fR to true for the filehandle \f(CW\*(C`stdin\*(C'\fR, the following code will do: .Sp .Vb 5 \& # assuming $handles is an already\-created \& # GnuPG::Handles object, this sets all \& # options for the filehandle stdin in one blow, \& # clearing out all others \& $handles\->options( \*(Aqstdin\*(Aq, { direct => 1 } ); \& \& # this is useful to just make one change \& # to the set of options for a handle \& $handles\->options( \*(Aqstdin\*(Aq )\->{direct} = 1; \& \& # and to get the setting... \& $setting = $handles\->options( \*(Aqstdin\*(Aq )\->{direct}; \& \& # and to clear the settings for stdin \& $handles\->options( \*(Aqstdin\*(Aq, {} ); .Ve .Sp The currently-used settings are as follows: .RS 4 .IP direct 4 .IX Item "direct" If the setting \f(CW\*(C`direct\*(C'\fR is true for a handle, the GnuPG process spawned will access the handle directly. This is useful for having the GnuPG process read or write directly to or from an already-opened file. .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" GnuPG::Interface,