And how would I go about seeing if the package/module *is* on the server using some script?

Easy - try to use the module, if that fails, it is not there. At least it is not found in any path included in perl's built-in array @INC.

So how do these things work?

What kind of "hosting server" do you have? what kind of access? Is it a server with shell access (i.e. ssh) or a plain web server?

Perl comes with many modules included, two of them are Config and Module::CoreList. The latter can be used to list all core modules:

# command line $ perl -lE 'use Module::CoreList; say for Module::CoreList->find_modul +es' # CGI #!/usr/bin/perl use Module::CoreList; use 5.10.0; say "Content-type: text/html\n"; say <<EOH; <html><head><title>CoreList</title></head> <body><h1>Perl Core Modules:</h1> <pre> EOH say for Module::CoreList->find_modules; say "</pre></body></html>";

The Config module exports the hash %Config which holds all information about how perl was built, including paths for module inclusion search (which, again, show up in @INC). The relevant keys are

In a sane setup, the core modules root is $Config{privlib}. All vendor provided modules of the platform live in vendorlib, the modules specific for the site are in sitelib.

You can prepend an arbitrary directory to @INC using the lib module

use lib '/path/to/my/modules';

which ensures that modules are first looked for in there.

This bunch of information should be enough to enable you to answer the rest of your questions by yourself.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

In reply to Re: How do I know if a package is on my server? by shmem
in thread How do I know if a package is on my server? by gsd4me

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.