develooper Front page | perl.perl5.porters | Postings from April 2006

[perl #38828] Error in HTTP::DAV in perl language

Thread Next
April 1, 2006 03:30
[perl #38828] Error in HTTP::DAV in perl language
Message ID:
# New Ticket Created by  "USaravanan" 
# Please include the string:  [perl #38828]
# in the subject line of all future correspondence about this issue. 
# <URL: >


I am trying to upload file using webDAV property in perl.

Front page using html

<title>WebDAV Tool</title>
<body bgcolor="#ffffcc">
<FORM ACTION=" <http://localhost/virtual/>
http://localhost/virtual/" METHOD="post"> 
<b>File 1</b>: &nbsp; <INPUT TYPE="file" NAME="file1" SIZE=40><br/>
<table width="100%">
<td width="25%">&nbsp;</td><td width="50%"><INPUT TYPE="submit"
name="Submit" value="SUBMIT"><br/>

Back end file

use CGI;
use CGI::Carp qw(fatalsToBrowser);
use HTTP::DAV;

$d = new HTTP::DAV;

$url =" <>";

$d->credentials( -user=>"vijay", -pass =>"emantras", -url =>$url);

$d->open( -url=>"$url" )  || die("Couldn't open $url: " .$d->message .

# $upload_dir = "d://perl_up"; 
 $upload_dir = "$url"."xdb1"; 

 $query = new CGI; 

 $filename = $query->param("file1"); 
# $email_address = $query->param("emailaddress"); 
 $filename =~ s/.*[\/\\](.*)/$1/;

  if ( $d->put( -local => "$filename", -url => $upload_dir))
      print "successfully uploaded $filename to $upload_dir\n";

      print "put failed: " . $d->message . "\n";

  $d->unlock( -url => $upload_dir );

   print $query->header ( ); 
 print <<END_HTML 


<body bgcolor="#ffffcc">

 <P>Your file has been uploaded!</P> 



Error :

Software error:

Can't locate HTTP/ in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at C:\Inetpub\wwwroot\virtual\ line 3.

BEGIN failed--compilation aborted at C:\Inetpub\wwwroot\virtual\
line 3.

For help, please send mail to this site's webmaster, giving this error
message and the time and date of the error. 

I am endeavour to implement WEBDAV method for uploading file/files with perl
as back end. The front page is constructed in html. We are trying to get
action from perl script. I have used HTTP::DAV and paste the same in
c:\perl\lib\ directory.


Could you recover or give exact solution for the above error which pasted


Thanks and regards


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About