#! /usr/bin/perl -w # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42) # wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a beer in return. Anton Berezin # ---------------------------------------------------------------------------- # # Version 0.1 # use warnings; use strict; use File::Random qw(:all); my $CPAN = '/home/tobez/share/CPAN/authors/id'; while (1) { my $rf = random_file( -dir => $CPAN, -recursive => 1, -check => qr/\.tar\.[gb]z$/, ); my $mod = $rf; $mod =~ s|-[-\d.]+\.tar\.[gb]z$||; $mod =~ s|.*/||; my @p = glob "/usr/ports/*/p5-$mod"; print "$CPAN/$rf\n"; if (@p) { print "(skipping -> @p)\n"; } elsif (-M "$CPAN/$rf" > 365) { print "(skipping, more than a year old)\n"; } else { last; } }