=head1 NAME GRID::Machine::Result - The object describing the result of a GRID::Machine RPC =head1 DESCRIPTION The class C is used by both the local and remote sides of the C, though most of its methods are called on the remote side. The result of a RPC is a C object. Such object has the following attributes: =over 2 =item * I The C of result returned. A string. Fixed by the protocol. Common values are C and C. =item * I A string containing the contents of C produced during the duration of the RPC =item * I A string containing the contents of C produced during the duration of the RPC =item * I A reference to an C containing the results returned by the RPC =item * I The contents of C<$?> as produced during the RPC =item * I The contents of C<$@> as produced during the RPC =back =head2 The Constructor C Syntax: GRID::Machine::Result->new( stdout => $rstdout, errmsg => $err, stderr => $rstderr, results => \@results ) Builds a new result object. =head2 The C Method Returns C if the RPC didn't died, i.e. if the C attribute is not the string C<'DIED'> =head2 The C Method Returns C if the RPC didn't died and didn't send any messages through stderr. See an example. When running the following program: $ cat noerrvsok.pl #!/usr/local/bin/perl -w use strict; use GRID::Machine; my $machine = shift || $ENV{GRID_REMOTE_MACHINE}; my $m = GRID::Machine->new( host => $machine ); my $r = $m->eval( q{print STDERR "This is the end\n" }); print "print to STDERR:\n"; print "<".$r->ok.">\n"; print "<".$r->noerr.">\n"; $r = $m->eval( q{warn "This is a warning\n" }); print "Warn:\n"; print "<".$r->ok.">\n"; print "<".$r->noerr.">\n"; we get the following output: $ errvsok.pl print to STDERR: <1> <> Warn: <1> <> =head2 The C Method Returns the first element of the list referenced by the C attribute This method is called when a C object is evaluated in a Boolean context (i.e. C is overloaded). =head2 The C Method Returns the list referenced by the C attribute =head2 The C Method. Stringification of a C object Returns the string made of concatenating C, C and C. The Perl operator C is overloaded using this method. Thus, wherever a C object is used on a scalar string context the C will be called. =head1 SEE ALSO =over 2 =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * Man pages of C, C, C, C, C, C, C =item * L =back =head1 AUTHOR Casiano Rodriguez Leon Ecasiano@ull.esE =head1 ACKNOWLEDGMENTS This work has been supported by CEE (FEDER) and the Spanish Ministry of I through I number TIN2005-08818-C04-04 (ULL::OPLINK project L). Support from Gobierno de Canarias was through GC02210601 (I). The University of La Laguna has also supported my work in many ways and for many years. I wish to thank Paul Evans for his C module: it was the source of inspiration for this module. To Alex White, Dmitri Kargapolov, Eric Busto and Erik Welch for their contributions. To the Perl Monks, and the Perl Community for generously sharing their knowledge. Finally, thanks to Juana, Coro and my students at La Laguna. =head1 LICENCE AND COPYRIGHT Copyright (c) 2007 Casiano Rodriguez-Leon (casiano@ull.es). All rights reserved. These modules are free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.