Meta

 view release on metacpan or  search on metacpan

Meta/Utils/File/Move.pm  view on Meta::CPAN

#!/bin/echo This is a perl module and should not be run

package Meta::Utils::File::Move;

use strict qw(vars refs subs);
use File::Copy qw();
use Error qw(:try);

our($VERSION,@ISA);
$VERSION="0.32";
@ISA=qw();

#sub mv($$);
#sub mv_noov($$);
#sub TEST($);

#__DATA__

sub mv($$) {
	my($fil1,$fil2)=@_;
	if(!File::Copy::move($fil1,$fil2)) {
		throw Meta::Error::Simple("unable to move [".$fil1."] to [".$fil2."]");
	}
}

sub mv_noov($$) {
	my($fil1,$fil2)=@_;
	if(-f $fil2) {
		throw Meta::Error::Simple("file [".$fil2."] exists");
	}
	mv($fil1,$fil2);
}

sub TEST($) {
	my($context)=@_;
	return(1);
}

1;

__END__

=head1 NAME

Meta::Utils::File::Move - library to help you move files.

=head1 COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer;
All rights reserved.

=head1 LICENSE

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.

=head1 DETAILS

	MANIFEST: Move.pm
	PROJECT: meta
	VERSION: 0.32

=head1 SYNOPSIS

	package foo;
	use Meta::Utils::File::Move qw();
	Meta::Utils::File::Move::mv($file1,$file2);



( run in 1.270 second using v1.01-cache-2.11-cpan-524268b4103 )