Last active
August 29, 2015 14:07
-
-
Save dnmfarrell/9b666b32eb3ea93150b3 to your computer and use it in GitHub Desktop.
Script that sometimes generates an error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# or.pl | |
# $ or.pl [email protected] | |
use strict; | |
use warnings; | |
use Object::Remote; | |
use Object::Remote::Connector::SSH; | |
use Eval::WithLexicals; | |
my $connector = Object::Remote::Connector::SSH->new(ssh_to => shift, timeout => 100); | |
my $conn = Object::Remote->connect($connector); | |
my $eval = Eval::WithLexicals->new::on($conn); | |
$eval->eval(q{my $x = `uptime`}); | |
warn $eval->eval(q{$x}); | |
# ~ or.pl [email protected] | |
# Can't locate object method "remote_object" via package "Object::Remote::Connector::SSH" at /home/sillymoose/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/Object/Remote.pm line 14. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment