Permalink
Browse files

initial commit: just docs

  • Loading branch information...
0 parents commit da4248fd5d25cd8624c1c0a24b848fd76868ad1b @yannk committed Oct 12, 2009
Showing with 172 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +2 −0 .shipit
  3. +4 −0 Changes
  4. +21 −0 MANIFEST
  5. +14 −0 MANIFEST.SKIP
  6. +10 −0 Makefile.PL
  7. +27 −0 README
  8. +63 −0 lib/Data/Layered.pm
  9. +4 −0 t/00_compile.t
  10. +5 −0 xt/perlcritic.t
  11. +4 −0 xt/pod.t
  12. +9 −0 xt/podspell.t
  13. +4 −0 xt/synopsis.t
@@ -0,0 +1,5 @@
+META.yml
+Makefile
+inc/
+pm_to_blib
+*~
@@ -0,0 +1,2 @@
+steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
+git.push_to = origin
@@ -0,0 +1,4 @@
+Revision history for Perl extension Data::Layered
+
+0.01 Mon Oct 12 14:03:40 2009
+ - original version
@@ -0,0 +1,21 @@
+.gitignore
+Changes
+inc/Module/Install.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/Data/Layered.pm
+Makefile.PL
+MANIFEST This list of files
+META.yml
+README
+t/00_compile.t
+xt/perlcritic.t
+xt/pod.t
+xt/podspell.t
+xt/synopsis.t
@@ -0,0 +1,14 @@
+\bRCS\b
+\bCVS\b
+\.svn/
+\.git/
+^MANIFEST\.
+^Makefile$
+~$
+\.old$
+^blib/
+^pm_to_blib
+^MakeMaker-\d
+\.gz$
+\.cvsignore
+\.shipit
@@ -0,0 +1,10 @@
+use inc::Module::Install;
+name 'Data-Layered';
+all_from 'lib/Data/Layered.pm';
+
+build_requires 'Test::More';
+use_test_base;
+auto_include_deps;
+author_tests('xt');
+auto_set_repository;
+WriteAll;
27 README
@@ -0,0 +1,27 @@
+This is Perl module Data::Layered.
+
+INSTALLATION
+
+Data::Layered installation is straightforward. If your CPAN shell is set up,
+you should just be able to do
+
+ % cpan Data::Layered
+
+Download it, unpack it, then build it as per the usual:
+
+ % perl Makefile.PL
+ % make && make test
+
+Then install it:
+
+ % make install
+
+DOCUMENTATION
+
+Data::Layered documentation is available as in POD. So you can do:
+
+ % perldoc Data::Layered
+
+to read the documentation online with your favorite pager.
+
+Yann Kerherve
@@ -0,0 +1,63 @@
+package Data::Layered;
+
+use strict;
+use 5.008_001;
+our $VERSION = '0.01';
+
+=encoding utf-8
+
+=head1 NAME
+
+Data::Layered - Access data using layered data store (typically caches)
+
+=head1 SYNOPSIS
+
+ use Data::Layered 'layered_get';
+
+ $keys = [ 'what', 'ever' ];
+ $layers = [ \&fast_small_cache, \&network_cache, \&slow_backend ];
+
+ $results = layered_get $keys, $layers;
+ $results = layered_get $keys, $layers, -1;
+
+ for (@$results) {
+ if ($_ && $_ == '-1') {
+ warn "Oh, no, 404 not found";
+ }
+ print "Happy result: $_\n";
+ }
+
+
+=head1 DESCRIPTION
+
+Data::Layered implements a small utility method to help you retrieve
+some quantity of data out of hierarchical datastores. The typical
+use case is to retrieve data from:
+
+=over 4
+
+=item * local memory cache
+
+=item * network memory cache (memcached)
+
+=item * canonical datastore
+
+=cut
+
+though, there is no assumption made by this module about the type
+of these stores, their topography or their response time.
+
+=head1 AUTHOR
+
+Yann Kerherve E<lt>yannk@cpan.orgE<gt>
+
+=head1 LICENSE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+=cut
+
+1;
@@ -0,0 +1,4 @@
+use strict;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'Data::Layered' }
@@ -0,0 +1,5 @@
+use strict;
+use Test::More;
+eval q{ use Test::Perl::Critic };
+plan skip_all => "Test::Perl::Critic is not installed." if $@;
+all_critic_ok("lib");
@@ -0,0 +1,4 @@
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
@@ -0,0 +1,9 @@
+use Test::More;
+eval q{ use Test::Spelling };
+plan skip_all => "Test::Spelling is not installed." if $@;
+add_stopwords(<DATA>);
+set_spell_cmd("aspell -l en list");
+all_pod_files_spelling_ok('lib');
+__DATA__
+Tatsuhiko
+Miyagawa
@@ -0,0 +1,4 @@
+use Test::More;
+eval "use Test::Synopsis";
+plan skip_all => "Test::Synopsis required" if $@;
+all_synopsis_ok();

0 comments on commit da4248f

Please sign in to comment.