Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Module object seen as empty variable?

by vladb (Vicar)
on Jun 13, 2002 at 14:31 UTC ( [id://174217]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://174217]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (None)
    As of 2024-04-25 00:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found