Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

as module

  • Loading branch information...
commit 04e3d823fd815561660642bac875d66722c9f9c5 1 parent 4491914
Naim authored
10 Changes~
... ... @@ -0,0 +1,10 @@
  1 +0.04
  2 + -remove the -file param releted code.
  3 + -change the all say to perl due the perl 5.8.x(really because this version is using be RHEL/CentOS )
  4 + -
  5 +0.03
  6 + -adding the command line args. ( -url , -c , -n , -debug , -file, -proxy , useragent )
  7 +0.02
  8 + -add some stats output + small code refactoring
  9 +0.01
  10 + -first public release
9 MANIFEST
... ... @@ -0,0 +1,9 @@
  1 +Changes
  2 +MANIFEST
  3 +Makefile.PL
  4 +README
  5 +lib/AnyEvent/HTTPBenchmark.pm
  6 +t/00-load.t
  7 +t/manifest.t
  8 +t/pod-coverage.t
  9 +t/pod.t
19 Makefile.PL
... ... @@ -0,0 +1,19 @@
  1 +use strict;
  2 +use warnings;
  3 +use ExtUtils::MakeMaker;
  4 +
  5 +WriteMakefile(
  6 + NAME => 'AnyEvent::HTTPBenchmark',
  7 + AUTHOR => q{Naim Shafiev <naim@cpan.org>},
  8 + VERSION_FROM => 'lib/AnyEvent/HTTPBenchmark.pm',
  9 + ABSTRACT_FROM => 'lib/AnyEvent/HTTPBenchmark.pm',
  10 + ($ExtUtils::MakeMaker::VERSION >= 6.3002
  11 + ? ('LICENSE'=> 'gpl')
  12 + : ()),
  13 + PL_FILES => {},
  14 + PREREQ_PM => {
  15 + 'Test::More' => 0,
  16 + },
  17 + dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
  18 + clean => { FILES => 'AnyEvent-HTTPBenchmark-*' },
  19 +);
12 ignore.txt
... ... @@ -0,0 +1,12 @@
  1 +blib*
  2 +Makefile
  3 +Makefile.old
  4 +Build
  5 +Build.bat
  6 +_build*
  7 +pm_to_blib*
  8 +*.tar.gz
  9 +.lwpcookies
  10 +cover_db
  11 +pod2htm*.tmp
  12 +AnyEvent-HTTPBenchmark-*
118 lib/AnyEvent/HTTPBenchmark.pm
... ... @@ -0,0 +1,118 @@
  1 +package AnyEvent::HTTPBenchmark;
  2 +
  3 +use warnings;
  4 +use strict;
  5 +
  6 +=head1 NAME
  7 +
  8 +AnyEvent::HTTPBenchmark - The great new AnyEvent::HTTPBenchmark!
  9 +
  10 +=head1 VERSION
  11 +
  12 +Version 0.01
  13 +
  14 +=cut
  15 +
  16 +our $VERSION = '0.01';
  17 +
  18 +
  19 +=head1 SYNOPSIS
  20 +
  21 +Quick summary of what the module does.
  22 +
  23 +Perhaps a little code snippet.
  24 +
  25 + use AnyEvent::HTTPBenchmark;
  26 +
  27 + my $foo = AnyEvent::HTTPBenchmark->new();
  28 + ...
  29 +
  30 +=head1 EXPORT
  31 +
  32 +A list of functions that can be exported. You can delete this section
  33 +if you don't export anything, such as for a purely object-oriented module.
  34 +
  35 +=head1 SUBROUTINES/METHODS
  36 +
  37 +=head2 function1
  38 +
  39 +=cut
  40 +
  41 +sub function1 {
  42 +}
  43 +
  44 +=head2 function2
  45 +
  46 +=cut
  47 +
  48 +sub function2 {
  49 +}
  50 +
  51 +=head1 AUTHOR
  52 +
  53 +Naim Shafiev, C<< <naim at cpan.org> >>
  54 +
  55 +=head1 BUGS
  56 +
  57 +Please report any bugs or feature requests to C<bug-anyevent-httpbenchmark at rt.cpan.org>, or through
  58 +the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-HTTPBenchmark>. I will be notified, and then you'll
  59 +automatically be notified of progress on your bug as I make changes.
  60 +
  61 +
  62 +
  63 +
  64 +=head1 SUPPORT
  65 +
  66 +You can find documentation for this module with the perldoc command.
  67 +
  68 + perldoc AnyEvent::HTTPBenchmark
  69 +
  70 +
  71 +You can also look for information at:
  72 +
  73 +=over 4
  74 +
  75 +=item * RT: CPAN's request tracker
  76 +
  77 +L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=AnyEvent-HTTPBenchmark>
  78 +
  79 +=item * AnnoCPAN: Annotated CPAN documentation
  80 +
  81 +L<http://annocpan.org/dist/AnyEvent-HTTPBenchmark>
  82 +
  83 +=item * CPAN Ratings
  84 +
  85 +L<http://cpanratings.perl.org/d/AnyEvent-HTTPBenchmark>
  86 +
  87 +=item * Search CPAN
  88 +
  89 +L<http://search.cpan.org/dist/AnyEvent-HTTPBenchmark/>
  90 +
  91 +=back
  92 +
  93 +
  94 +=head1 ACKNOWLEDGEMENTS
  95 +
  96 +
  97 +=head1 LICENSE AND COPYRIGHT
  98 +
  99 +Copyright 2010 Naim Shafiev.
  100 +
  101 +This program is free software; you can redistribute it and/or modify
  102 +it under the terms of the GNU General Public License as published by
  103 +the Free Software Foundation; version 2 dated June, 1991 or at your option
  104 +any later version.
  105 +
  106 +This program is distributed in the hope that it will be useful,
  107 +but WITHOUT ANY WARRANTY; without even the implied warranty of
  108 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  109 +GNU General Public License for more details.
  110 +
  111 +A copy of the GNU General Public License is available in the source tree;
  112 +if not, write to the Free Software Foundation, Inc.,
  113 +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  114 +
  115 +
  116 +=cut
  117 +
  118 +1; # End of AnyEvent::HTTPBenchmark
10 t/00-load.t
... ... @@ -0,0 +1,10 @@
  1 +#!perl -T
  2 +
  3 +use Test::More tests => 1;
  4 +
  5 +BEGIN {
  6 + use_ok( 'AnyEvent::HTTPBenchmark' ) || print "Bail out!
  7 +";
  8 +}
  9 +
  10 +diag( "Testing AnyEvent::HTTPBenchmark $AnyEvent::HTTPBenchmark::VERSION, Perl $], $^X" );
55 t/boilerplate.t
... ... @@ -0,0 +1,55 @@
  1 +#!perl -T
  2 +
  3 +use strict;
  4 +use warnings;
  5 +use Test::More tests => 3;
  6 +
  7 +sub not_in_file_ok {
  8 + my ($filename, %regex) = @_;
  9 + open( my $fh, '<', $filename )
  10 + or die "couldn't open $filename for reading: $!";
  11 +
  12 + my %violated;
  13 +
  14 + while (my $line = <$fh>) {
  15 + while (my ($desc, $regex) = each %regex) {
  16 + if ($line =~ $regex) {
  17 + push @{$violated{$desc}||=[]}, $.;
  18 + }
  19 + }
  20 + }
  21 +
  22 + if (%violated) {
  23 + fail("$filename contains boilerplate text");
  24 + diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
  25 + } else {
  26 + pass("$filename contains no boilerplate text");
  27 + }
  28 +}
  29 +
  30 +sub module_boilerplate_ok {
  31 + my ($module) = @_;
  32 + not_in_file_ok($module =>
  33 + 'the great new $MODULENAME' => qr/ - The great new /,
  34 + 'boilerplate description' => qr/Quick summary of what the module/,
  35 + 'stub function definition' => qr/function[12]/,
  36 + );
  37 +}
  38 +
  39 +TODO: {
  40 + local $TODO = "Need to replace the boilerplate text";
  41 +
  42 + not_in_file_ok(README =>
  43 + "The README is used..." => qr/The README is used/,
  44 + "'version information here'" => qr/to provide version information/,
  45 + );
  46 +
  47 + not_in_file_ok(Changes =>
  48 + "placeholder date/time" => qr(Date/time)
  49 + );
  50 +
  51 + module_boilerplate_ok('lib/AnyEvent/HTTPBenchmark.pm');
  52 +
  53 +
  54 +}
  55 +
13 t/manifest.t
... ... @@ -0,0 +1,13 @@
  1 +#!perl -T
  2 +
  3 +use strict;
  4 +use warnings;
  5 +use Test::More;
  6 +
  7 +unless ( $ENV{RELEASE_TESTING} ) {
  8 + plan( skip_all => "Author tests not required for installation" );
  9 +}
  10 +
  11 +eval "use Test::CheckManifest 0.9";
  12 +plan skip_all => "Test::CheckManifest 0.9 required" if $@;
  13 +ok_manifest();
18 t/pod-coverage.t
... ... @@ -0,0 +1,18 @@
  1 +use strict;
  2 +use warnings;
  3 +use Test::More;
  4 +
  5 +# Ensure a recent version of Test::Pod::Coverage
  6 +my $min_tpc = 1.08;
  7 +eval "use Test::Pod::Coverage $min_tpc";
  8 +plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
  9 + if $@;
  10 +
  11 +# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
  12 +# but older versions don't recognize some common documentation styles
  13 +my $min_pc = 0.18;
  14 +eval "use Pod::Coverage $min_pc";
  15 +plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
  16 + if $@;
  17 +
  18 +all_pod_coverage_ok();
12 t/pod.t
... ... @@ -0,0 +1,12 @@
  1 +#!perl -T
  2 +
  3 +use strict;
  4 +use warnings;
  5 +use Test::More;
  6 +
  7 +# Ensure a recent version of Test::Pod
  8 +my $min_tp = 1.22;
  9 +eval "use Test::Pod $min_tp";
  10 +plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
  11 +
  12 +all_pod_files_ok();

0 comments on commit 04e3d82

Please sign in to comment.
Something went wrong with that request. Please try again.