ketaki has asked for the wisdom of the Perl Monks concerning the following question:

how do i add a module to my webserver. the win32::OLE module is not installed on the server and i need to use it in my script.

thanks,....
ketaki

p.s. yes i did contact the web host for installing the module for me but they unfortunately told me that i will have to upgrade to a paid account to be able to get this done from them. So i have to do this myself.

....thanx,.....
ketaki

update: i tried to install the perl module on my webserver with the help of a script which can run commands and do some other things on the webserver machine(which has perl on it). i got this script from the writeup on 'installing perl modules without shell access'. i succeeded till the stage where the files are extracted and i can see the makefile.pl file (among other files) in the 'build' directory under the root directory ,on the webserver . now comes the stage when the perl makefile.pl command has to be executed. when i do that, it gives an error : 'OS unsupported'. what does this mean? anyone who has installed perl modules on there computer and have perl on their computer, could be able to explain to me how to get around this error. thanx, ketaki

Replies are listed 'Best First'.
Re: adding modules
by pc88mxer (Vicar) on Jul 02, 2008 at 05:16 UTC
      i went through the text on 'a guide to installing modules'. During the process, after i have downloaded and extracted,i am supposed to run this command at the c prompt... perl makefile.pl when i do this in dos, it says 'perl is not recognised as an internal or external command, operable program or batch file. this could be because the perl compiler/interpreter is not there on my computer. Is there any way i can install the module on the webserver without requiring perl on my computer.
        Have you tried contacting the administrators of the web server you are using to ask if they'll install the module for you?

        Cheers,

        Brent

        -- Yeah, I'm a Delt.

        Do you have command-line (shell) access to your web server (i.e. can you use telnet or SSH to connect to your server and get a prompt), or are you constrained to a Web-based interface or FTP only?

        In the first case, you will need to transfer the module tarball(s) to your web server, then use the command line on the server (as opposed to the C prompt on your PC) to execute the commands described in the tutorial.

        In the second case, unfortunately, you'll have to pony up the cash for a paid account, or find another web host that does not treat the installation of Perl modules as a service for which a fee is demanded. Good luck finding the latter, though!

Re: adding modules
by moritz (Cardinal) on Jul 03, 2008 at 10:45 UTC
    Maybe Makefile.PL doesn't recognize your operating system as being a Win32 flavour and aborts installation.

    Which leads us to the question: Which operating system does your server run on?

Re: adding modules
by marto (Cardinal) on Jul 03, 2008 at 10:47 UTC
    You keep asking about this in the CB, which OS are you running?
    The Makefile.PL states:
    unless ($^O eq "MSWin32" || $^O eq "cygwin") { die "OS unsupported\n"; }
    Which suggests you are not running cygwin or a win32 variant.

    Update: Are you running a 64bit version of windows? If so $^O will be 'MSWin64'.
    Update 2: Corion has informed us (in the CB) that you are running Fedora, so trying to install a module for Windows will not work. What are you trying achieve with Win32::OLE?.

    Hope this helps

    Martin
      the OS on my system is windows32, but i am installing this module on the web server. i am trying to link a excel worksheet with the perl/cgi script which i view on the browswer. my web server has cgi and perl on it. i dont have a perl compiler/interpreter on my computer.
        I don't know how many times people can tell you this, but Win32::OLE is not going to work on a linux/unix server. Why not use SpeadSheet::ParseExcel or something along those lines to achieve your goal? Also please read How do I post a question effectively? and the PerlMonks FAQ, IMHO you need to put in more effort to your posts, and start taking the advice people are giving you, otherwise you are wasting our time, and yours.

        Martin

        If you are simply using Excel to maintain tabular data that will eventually be processed by a CGI script, you can do yourself a big favor by exporting the data into a format that is easier for Perl to digest. Excel can export a worksheet in HTML format, which can then be read with any of the HTML parser modules or simply uploaded to the server for direct consumption by browsers; or it can export the data as a CSV (comma-separated variable) file, for which there are other modules with which Perl can massage the data.

        On the other hand, if you want to use CGI to massage data already present on the server to produce a file intended for consumption by Excel, your best bet is to name the script with a .csv extension, and produce valid CSV output from the script (preferably with a module designed for the purpose). Internet Explorer will (by default) then open the CGI script in Excel, embedded in your browser window.

        A naive approach to parsing CSV with split() or creating CSV with join() will often work if you are sure your data will never contain embedded commas or quotation marks. However, that is only a subset of valid CSV; hence the recommendation to use modules, which handle these cases better than split and join are capable of. HTML, on the other hand (and particularly Microsoft generated HTML) must be parsed rather than analyzed with split and join, and thus the modules are essential.

        Hope this helps.