Goo::ShellCommander - Run a command in the shell


Goo documentation Contained in the Goo distribution.

Index


Code Index:

NAME

Top

Goo::ShellCommander - Run a command in the shell

SYNOPSIS

Top

use Goo::ShellCommander;

DESCRIPTION

Top

METHODS

Top

run

keep adding a Thing to the program

AUTHOR

Top

Nigel Hamilton <nigel@trexy.com>

SEE ALSO

Top


Goo documentation Contained in the Goo distribution.

#!/usr/bin/perl

package Goo::ShellCommander;

###############################################################################
# Nigel Hamilton
#
# Copyright Nigel Hamilton 2005
# All Rights Reserved
#
# Author: 		Nigel Hamilton
# Filename:		Goo::ShellCommander.pm
# Description: 	Run a command in the shell
#
# Date	 		Change
# ----------------------------------------------------------------------------
# 01/08/05		Factored out of ProgramEditor as part of the new Goo
#
##############################################################################

use Goo::Object;
use Goo::Prompter;

use base qw(Goo::Object);


###############################################################################
#
# run - keep adding a thing to the program
#
###############################################################################

sub run { 

	my ($this, $thing, $target) = @_; 
	
	my $command = Goo::Prompter::ask("Enter a shell command>"); 
	
	print `$command`; 

	Goo::Prompter::notify("Command complete. Press a key to continue.");
	
} 

1;


__END__