From: rkinyon Date: Sun, 23 Sep 2007 01:56:53 +0000 (+0000) Subject: Added POD coverage test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f48ee487dd45f6c5d2e47d40c9d39d3d87b1119;p=dbsrgits%2FDBM-Deep.git Added POD coverage test --- diff --git a/MANIFEST b/MANIFEST index 8ff737b..ad92bcd 100644 --- a/MANIFEST +++ b/MANIFEST @@ -58,6 +58,7 @@ t/42_transaction_indexsector.t t/43_transaction_maximum.t t/44_upgrade_db.t t/98_pod.t +t/99_pod_coverage.t t/common.pm t/etc/db-0-983 t/etc/db-0-99_04 diff --git a/lib/DBM/Deep.pod b/lib/DBM/Deep.pod index 4bf937f..622130c 100644 --- a/lib/DBM/Deep.pod +++ b/lib/DBM/Deep.pod @@ -699,6 +699,31 @@ remove a filter, set the function reference to C: Please read L for examples of filters. +=head2 set_filter() + +This method takes two paramters - the filter type and the filter subreference. +The four types are: + +=over 4 + +=item * filter_store_key + +This subreference is called when a key is stored in a hash. + +=item * filter_store_value + +This subreference is called when a value is stored. + +=item * filter_fetch_key + +This subreference is called when a key is retrieved fram a hash. + +=item * filter_fetch_value + +This subreference is called when a key is retrieved. + +=back + =head1 ERROR HANDLING Most DBM::Deep methods return a true value for success, and call die() on diff --git a/t/99_pod_coverage.t b/t/99_pod_coverage.t new file mode 100644 index 0000000..0fd3457 --- /dev/null +++ b/t/99_pod_coverage.t @@ -0,0 +1,27 @@ +# Only DBM::Deep has any POD to test. All the other classes are private +# classes. Hence, they have no POD outside of DBM::Deep::Internals + +use strict; + +use Test::More tests => 1; + +eval "use Test::Pod::Coverage 1.04"; +plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; + +# I don't know why TYPE_ARRAY isn't being caught and TYPE_HASH is. +my @private_methods = qw( + TYPE_ARRAY +); + +# These are method names that have been commented out, for now +# max_of total_of +# begin_page end_page + +my $private_regex = do { + local $"='|'; + qr/^(?:@private_methods)$/ +}; + +pod_coverage_ok( 'DBM::Deep' => { + also_private => [ $private_regex ], +});