Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I disagree. I think auto updating of data is sometimes important, and Sysadmins often have more important things to worry about, especially if they are remote from the users of the perl module or if updates are frequent.

I have been a perl user in large bureaucratic corporations before, and trying to get a perl module installed system wide (so that any of my users could run a script that used it without further configuration) required months of lobbying. If I had asked for a cron job for auto updates as well then that would have been impossible. Needless to say we where stuck on perl 5.6 for years.

My view is that if updates are infrequent, (eg yearly), then just include the file in the distribution and release a new version when it needs updating. If updates are predicable in advance then you can make the module complain if it is to old.

If the updates are more frequent (eg weekly) than that then provide an update mechanism that can be used both by the sysadmin if they care, or by an unprivileged end user within the script that uses the module. I would have something like:

use Foo; use Foo::Updater; Foo::Updater->new->update() # Rest of script here

That call to update would compare the timestamp of a local cache with the latest version on your server, and pull the update if required. If the user is non privileged then the update gets put in their home directory. If the user is root then it goes to a central system wide location that all users can read. That way if the sysadmin cares, (Or if they notice the disc space and bandwidth consumption of hundreds of identical copies of the update data) they can setup a cron job to pull the updates, but if they don't care then users get the data anyway without their intervention.

In reply to Re^2: Packaging files with a module by chrestomanci
in thread Packaging files with a module by KSURi

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (4)
    As of 2018-05-26 16:32 GMT
    Find Nodes?
      Voting Booth?