Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dzil-ify the distribution

Fixes #12.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information...
commit e68e0fddd4b053434898e275420ff2187a0ea9a5 1 parent 328e026
@melo melo authored
View
2  .gitignore
@@ -6,3 +6,5 @@ Makefile.old
*.sw[op]
*.tar.gz
dump.rdb
+Redis-*
+.build/
View
2  Changes
@@ -1,6 +1,6 @@
Revision history for Redis
-1.950
+{{$NEXT}}
* DEPRECATED: the encoding attribute to new() - we will not support
automatic decoding after 2.000, so please test your code with
encoding => undef now.
View
22 MANIFEST
@@ -1,22 +0,0 @@
-Changes
-lib/Redis.pm
-lib/Redis/Hash.pm
-lib/Redis/List.pm
-Makefile.PL
-MANIFEST
-README
-scripts/publish.pl
-scripts/redis-benchmark.pl
-t/00-load.t
-t/01-basic.t
-t/02-responses.t
-t/03-pubsub.t
-t/05-nonblock.t
-t/07-reconnect.t
-t/08-unix-socket.t
-t/09-env-redis-server.t
-t/10-tie-list.t
-t/20-tie-hash.t
-t/pod-coverage.t
-t/pod.t
-t/tlib/Test/SpawnRedisServer.pm
View
36 Makefile.PL
@@ -1,36 +0,0 @@
-use strict;
-use warnings;
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
- NAME => 'Redis',
- AUTHOR => 'Pedro Melo <melo@simplicidade.org>',
- VERSION_FROM => 'lib/Redis.pm',
- ABSTRACT_FROM => 'lib/Redis.pm',
- PL_FILES => {},
- PREREQ_PM => {
- 'Carp' => 0,
- 'Data::Dumper' => 0,
- 'Encode' => 0,
- 'Exporter' => 0,
- 'Fcntl' => 0,
- 'File::Temp' => 0,
- 'IO::Handle' => 0,
- 'IO::Select' => 0,
- 'IO::Socket::INET' => 0,
- 'IO::Socket::UNIX' => 0,
- 'IO::String' => 0,
- 'IPC::Cmd' => 0,
- 'POSIX' => 0,
- 'Scalar::Util' => 0,
- 'Test::Deep' => 0,
- 'Test::Exception' => 0,
- 'Test::Fatal' => 0,
- 'Test::More' => 0.96,
- 'Tie::Hash' => 0,
- 'Time::HiRes' => 0,
- 'Try::Tiny' => 0,
- },
- dist => {COMPRESS => 'gzip -9f', SUFFIX => 'gz'},
- clean => {FILES => 'Redis-*'},
-);
View
44 README
@@ -1,44 +0,0 @@
-Redis
-
-Perl binding for Redis database which is in-memory hash store with
-support for scalars, arrays and sets and disk persistence.
-
-INSTALLATION
-
-To install this module, run the following commands:
-
- perl Makefile.PL
- make
- make test
- make install
-
-SUPPORT AND DOCUMENTATION
-
-After installing, you can find documentation for this module with the
-perldoc command.
-
- perldoc Redis
-
-You can also look for information at:
-
- RT, CPAN's request tracker
- http://rt.cpan.org/NoAuth/Bugs.html?Dist=Redis
-
- AnnoCPAN, Annotated CPAN documentation
- http://annocpan.org/dist/Redis
-
- CPAN Ratings
- http://cpanratings.perl.org/d/Redis
-
- Search CPAN
- http://search.cpan.org/dist/Redis
-
-
-COPYRIGHT AND LICENCE
-
-Copyright (C) 2011 Pedro Melo
-Copyright (C) 2009-2010 Dobrica Pavlinusic
-
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
View
10 dist.ini
@@ -0,0 +1,10 @@
+name = Redis
+author = Pedro Melo <melo@cpan.org>
+license = Artistic_2_0
+copyright_holder = Pedro Melo
+copyright_year = 2012
+
+[@Author::MELO]
+
+[RemovePrereqs]
+remove = Test::SpawnRedisServer
View
58 lib/Redis.pm
@@ -1,5 +1,9 @@
package Redis;
+# ABSTRACT: Perl binding for Redis database
+# VERSION
+# AUTHORITY
+
use warnings;
use strict;
@@ -15,7 +19,6 @@ use Try::Tiny;
use Scalar::Util ();
-our $VERSION = '1.950';
sub new {
my $class = shift;
@@ -1105,59 +1108,6 @@ The C<shutdown> method does not support pipelined operation.
$r->flushall;
-=head1 AUTHORS
-
-Pedro Melo, C<< <melo@cpan.org> >>
-
-Original author and maintainer: Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
-
-
-=head1 SOURCE
-
-The code is available at L<https://github.com/melo/perl-redis/>. You can
-clone a local copy using:
-
- git clone git://github.com/melo/perl-redis.git
-
-
-=head1 BUGS
-
-Bugs or feature requests should be posted to the Github Issues web
-interface at L<https://github.com/melo/perl-redis/issues>.
-
-Alternatively, you can also send them to C<bug-redis at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Redis>.
-I will be notified, and move them to the Github issues system.
-
-
-=head1 SUPPORT
-
-You can find documentation for this module with the perldoc command.
-
- perldoc Redis
- perldoc Redis::List
- perldoc Redis::Hash
-
-
-You can also look for information at:
-
-=over 4
-
-=item * Github Issues
-
-L<https://github.com/melo/perl-redis/issues>
-
-=item * Search CPAN
-
-L<http://search.cpan.org/dist/Redis>
-
-=item * MetaCPAN
-
-L<http://metacpan.org/dist/Redis>
-
-=back
-
-
=head1 ACKNOWLEDGEMENTS
The following persons contributed to this project (alphabetical order):
View
76 lib/Redis/Hash.pm
@@ -1,46 +1,14 @@
package Redis::Hash;
+# ABSTRACT: tie Perl hashes to Redis hashes
+# VERSION
+# AUTHORITY
+
use strict;
use warnings;
use Tie::Hash;
use base qw/Redis Tie::StdHash/;
-=head1 NAME
-
-Redis::Hash - tie perl hashes into Redis
-
-=head1 SYNOPSYS
-
- ## Create fake hash using keys like 'hash_prefix:KEY'
- tie %my_hash, 'Redis::Hash', 'hash_prefix', @Redis_new_parameters;
-
- ## Treat the entire Redis database as a hash
- tie %my_hash, 'Redis::Hash', undef, @Redis_new_parameters;
-
- $value = $my_list{$key};
- $my_list{$key} = $value;
-
- @keys = keys %my_hash;
- @values = values %my_hash;
-
- %my_hash = reverse %my_hash;
-
- %my_hash = ();
-
-
-=head1 DESCRIPTION
-
-Ties a Perl hash to Redis. Note that it doesn't use Redis Hashes, but
-implements a fake hash using regular keys like "prefix:KEY".
-
-If no C<prefix> is given, it will tie the entire Redis database
-as a hash.
-
-Future versions will also allow you to use real Redis hash structures.
-
-
-=cut
-
sub TIEHASH {
my ($class, $prefix, @rest) = @_;
@@ -94,4 +62,38 @@ sub CLEAR {
$self->{prefix_keys} = [];
}
-1;
+
+1; ## End of Redis::Hash
+
+
+=head1 SYNOPSYS
+
+ ## Create fake hash using keys like 'hash_prefix:KEY'
+ tie %my_hash, 'Redis::Hash', 'hash_prefix', @Redis_new_parameters;
+
+ ## Treat the entire Redis database as a hash
+ tie %my_hash, 'Redis::Hash', undef, @Redis_new_parameters;
+
+ $value = $my_list{$key};
+ $my_list{$key} = $value;
+
+ @keys = keys %my_hash;
+ @values = values %my_hash;
+
+ %my_hash = reverse %my_hash;
+
+ %my_hash = ();
+
+
+=head1 DESCRIPTION
+
+Ties a Perl hash to Redis. Note that it doesn't use Redis Hashes, but
+implements a fake hash using regular keys like "prefix:KEY".
+
+If no C<prefix> is given, it will tie the entire Redis database
+as a hash.
+
+Future versions will also allow you to use real Redis hash structures.
+
+
+=cut
View
54 lib/Redis/List.pm
@@ -1,35 +1,13 @@
package Redis::List;
+# ABSTRACT: tie Perl arrays to Redis lists
+# VERSION
+# AUTHORITY
+
use strict;
use warnings;
use base qw/Redis Tie::Array/;
-=head1 NAME
-
-Redis::List - tie perl arrays into Redis lists
-
-=head1 SYNOPSYS
-
- tie @my_list, 'Redis::List', 'list_name', @Redis_new_parameters;
-
- $value = $my_list[$index];
- $my_list[$index] = $value;
-
- $count = @my_list;
-
- push @my_list, 'values';
- $value = pop @my_list;
- unshift @my_list, 'values';
- $value = shift @my_list;
-
- ## NOTE: fourth parameter of splice is *NOT* supported for now
- @other_list = splice(@my_list, 2, 3);
-
- @my_list = ();
-
-
-=cut
-
sub TIEARRAY {
my ($class, $list, @rest) = @_;
@@ -105,4 +83,26 @@ sub EXTEND {
sub DESTROY { $_[0]->quit }
-1;
+1; ## End of Redis::List
+
+=head1 SYNOPSYS
+
+ tie @my_list, 'Redis::List', 'list_name', @Redis_new_parameters;
+
+ $value = $my_list[$index];
+ $my_list[$index] = $value;
+
+ $count = @my_list;
+
+ push @my_list, 'values';
+ $value = pop @my_list;
+ unshift @my_list, 'values';
+ $value = shift @my_list;
+
+ ## NOTE: fourth parameter of splice is *NOT* supported for now
+ @other_list = splice(@my_list, 2, 3);
+
+ @my_list = ();
+
+
+=cut
View
9 t/00-load.t
@@ -1,9 +0,0 @@
-#!perl -T
-
-use Test::More tests => 1;
-
-BEGIN {
- use_ok('Redis');
-}
-
-diag("Testing Redis $Redis::VERSION, Perl $], $^X");
View
23 t/pod-coverage.t
@@ -1,23 +0,0 @@
-use strict;
-use warnings;
-use Test::More;
-
-plan skip_all =>
- "Test::Pod::Coverage tests only run if \$RELEASE_TESTING is enabled"
- unless $ENV{RELEASE_TESTING};
-
-# Ensure a recent version of Test::Pod::Coverage
-my $min_tpc = 1.08;
-eval "use Test::Pod::Coverage $min_tpc";
-plan skip_all =>
- "Test::Pod::Coverage $min_tpc required for testing POD coverage"
- if $@;
-
-# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
-# but older versions don't recognize some common documentation styles
-my $min_pc = 0.18;
-eval "use Pod::Coverage $min_pc";
-plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
- if $@;
-
-all_pod_coverage_ok();
View
12 t/pod.t
@@ -1,12 +0,0 @@
-#!perl -T
-
-use strict;
-use warnings;
-use Test::More;
-
-# Ensure a recent version of Test::Pod
-my $min_tp = 1.22;
-eval "use Test::Pod $min_tp";
-plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
-
-all_pod_files_ok();
Please sign in to comment.
Something went wrong with that request. Please try again.