LWP::UserAgent::Patch::FilterMirrorMaxSize - Dont' mirror() files larger than a certain size
This document describes version 0.05 of LWP::UserAgent::Patch::FilterMirrorMaxSize (from Perl distribution LWP-UserAgent-Patch-FilterMirror), released on 2015-07-27.
use LWP::UserAgent::Patch::FilterMirrorMaxSize -size => 10*1024*1024; # use LWP::UserAgent's mirror() as usual
To use with CPAN::Mini command-line script:
% PERL5OPT="-MLWP::UserAgent::Patch::FilterMirrorMaxSize=-size,10485760,-verbose,1" minicpan -l /cpan -r http://mirrors.kernel.org/cpan/
If size is larger than the limit, the patch's wrapper method will return a dummy 304 (not modified) response object. This trick should work on at least some applications (like with CPAN::Mini, which I originally wrote this patch module for), but it might not :-)
Please visit the project's homepage at https://metacpan.org/release/LWP-UserAgent-Patch-FilterMirror.
Source repository is at https://github.com/sharyanto/perl-LWP-UserAgent-Patch-FilterMirror.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=LWP-UserAgent-Patch-FilterMirror
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2015 by firstname.lastname@example.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.