ARCv2

 view release on metacpan or  search on metacpan

lib/Arc/Command/Put.pm  view on Meta::CPAN

package Arc::Command::Put;

use strict;
use warnings;
use Carp;
use Arc::Command;

@Arc::Command::Put::ISA = qw(Arc::Command);

sub members 
{
	my $this = shift;
	return { %{$this->SUPER::members},
		# private:
		# protected:
	};
}

sub Execute
{
	my $this = shift;
	return $this->_SetError("No destination filename given!") unless (@_);
	return $this->_SetError($_[0]," is not writeable for me. !") unless (open FH, ">".$_[0]);

	while ($_ = <STDIN>)
	{
		print FH $_;
	}

	close FH;
	
	return 1;
}

return 1;



( run in 0.982 second using v1.01-cache-2.11-cpan-39bf76dae61 )