Skip to content

Instantly share code, notes, and snippets.

@dnmfarrell
Last active August 29, 2015 14:07
Show Gist options
  • Save dnmfarrell/9b666b32eb3ea93150b3 to your computer and use it in GitHub Desktop.
Save dnmfarrell/9b666b32eb3ea93150b3 to your computer and use it in GitHub Desktop.
Script that sometimes generates an error
#!/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