Yesterday I was feeling ill and bored and decided that it would be fun to watch CPAN get mirrored to my harddrive. I have been wanting to do some statistical analysis on the full CPAN set and I have plenty of room so I figured it would be a suitable distraction for my foggy head. I did a little googling and of course found merlyns useful article on making a Minimal CPAN mirror of the most recent files in the collection.

So of course I read the article, grabbed the code, plugged in my local paths and let it rip. The steady stream of messages about files being downloaded combined with my flu slowly lulled me into a pleasant stupor. Soon I fell sleepy and went for a nap.

Hours later I returned, somewhat refreshed and happy to discover that I was on 'X' and that soon it would be done. Preparations made, the decks cleared for war1, rations for the troops was provided2 and I settled into place to review the downloads, and....

My jaw fell suddenly, while I had been dallying an evil magician had been busy deleting the files, my return was to a log file showing all the precious gems that had been in my hands for the briefest of moments only to be spirited away! Crestfallen I retired from battlefield to analyze what went wrong.....

The responsible code was in two short lines:

=69= my $local_file = catfile($LOCAL, split "/", $path);
and
=105= return unless -f and not $mirrored{$File::Find::name};

for you see, File::Spec::Functions::catfile returns a localized path, and $File::Find::name contains a non localized (in fact not even canonical) string. The solution, albeit probably not the cleanest was to use the following as a replacement for line 105.

my ($v,$p,$n)=splitpath($File::Find::name); my $name=catfile($v,splitdir($p),$n); return unless -f and not $mirrored{$name};

It seems everyone get bitten by this kind of thing at some point or another...

  1. Empty coffee cups removed ashtry emptied etc.
  2. Food and coffee was provided
---
$world=~s/war/peace/g


In reply to OS issues get everybody at some point by demerphq

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.