package Xview; use strict; our $AUTOLOAD; sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self->{PID} = undef; bless ($self, $class); return $self; } sub load { my $self = shift; my $file = shift; $self->{PID} = open $self->{PIPE}, "|xview -fillscreen '$file'"; } sub quit { my $self = shift; if (defined $self->{PID}) { kill 'SIGTERM', $self->{PID}; $self->{PIPE} = undef; } } sub AUTOLOAD { my $self = shift; my $name = $AUTOLOAD; print "Unknown method $name called\n"; } 1;