in reply to Module object seen as empty variable?

This works correctly for me:
#!/usr/bin/perl -w use strict; use File::NCopy; my $copy_file = File::NCopy->new ( 'recursive' => 1, 'preserve' => 1, 'force-write' => 1, ); # WAS: $copy_file->copy "/ref/webmail","/www/$domain"; $copy_file->copy("/ref/webmail","/www/$domain");
You simply forgot to put a pair of '(' and ')' in your '->copy' call.

_____________________

Replies are listed 'Best First'.
Re: Re: Module object seen as empty variable?
by c (Hermit) on Jun 13, 2002 at 15:07 UTC
    What a drag. That fixed it! The perldoc for the module seems to indicate that the parens arent necessary:

    $file = File::NCopy->new(recursive => 1); $file->copy "file","other_file"; $file->copy "directory1","directory2"; $file = File::NCopy->new(u_chmod => \&my_chmod,f_check => \ +&my_fchec k); $file->copy "directory1","directory2";

    Thanks heaps! -c