[libcatmandu-marc-perl] 206/208: Fixing POD

Jonas Smedegaard dr at jones.dk
Sat Oct 28 03:42:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag upstream/1.19
in repository libcatmandu-marc-perl.

commit 148a3d344e776929db39fc4d133cd541a07578d0
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date:   Mon Oct 2 11:14:13 2017 +0200

    Fixing POD
---
 Changes                                      |  4 ++--
 lib/Catmandu/Exporter/MARC/ISO.pm            |  2 ++
 lib/Catmandu/Fix/Condition/marc_all_match.pm | 14 ++++----------
 lib/Catmandu/Fix/Condition/marc_any_match.pm | 14 ++++----------
 lib/Catmandu/Fix/Condition/marc_match.pm     | 22 +++++++++-------------
 5 files changed, 21 insertions(+), 35 deletions(-)

diff --git a/Changes b/Changes
index d4b6f2d..ae294f7 100644
--- a/Changes
+++ b/Changes
@@ -3,10 +3,10 @@ Revision history for Catmandu-MARC
 {{$NEXT}}
   - Adding marc_all_match
   - Adding marc_any_match
-  - Deprecating marc_match (on favor ot marc_all_match)
+  - Deprecating marc_match (in favor of marc_all_match)
   - Fixing ALEPHSEQ exporter: adding a default 'FMT' field
   - Moving all tests into a new tree for each seperate module
-  
+
 1.18  2017-07-22 11:46:52 CEST
   - Adding skip_errors option in the importer and exporter
   - More POD
diff --git a/lib/Catmandu/Exporter/MARC/ISO.pm b/lib/Catmandu/Exporter/MARC/ISO.pm
index 3411ffa..c63c840 100644
--- a/lib/Catmandu/Exporter/MARC/ISO.pm
+++ b/lib/Catmandu/Exporter/MARC/ISO.pm
@@ -82,6 +82,8 @@ sub add {
 sub commit {
 	my ($self) = @_;
 	$self->fh->flush;
+
+    1;
 }
 
 1;
diff --git a/lib/Catmandu/Fix/Condition/marc_all_match.pm b/lib/Catmandu/Fix/Condition/marc_all_match.pm
index 4b8ff5e..31f40b9 100644
--- a/lib/Catmandu/Fix/Condition/marc_all_match.pm
+++ b/lib/Catmandu/Fix/Condition/marc_all_match.pm
@@ -45,27 +45,21 @@ Catmandu::Fix::Condition::marc_all_match - Test if a MARC (sub)field matches a v
 
    # marc_all_match(MARC_PATH,REGEX)
 
-   # Match if 245 contains the value "My funny title"
+   # Match when 245 contains the value "My funny title"
    if marc_all_match('245','My funny title')
    	add_field('my.funny.title','true')
    end
 
-   # Match if 245a contains the value "My funny title"
+   # Match when 245a contains the value "My funny title"
    if marc_all_match('245a','My funny title')
    	add_field('my.funny.title','true')
    end
 
-   # Match if all 650 fields contain digits
+   # Match when all 650 fields contain digits
    if marc_all_match('650','[0-9]')
      add_field('has_digits','true')
    end
 
-   # Match if /one/ of the 650 fields contain digits
-   do marc_each()
-       if marc_all_match('650','[0-9]')
-         add_field('has_digits','true')
-       end
-   end
 =head1 DESCRIPTION
 
 Evaluate the enclosing fixes only if the MARC (sub)field matches a
@@ -76,7 +70,7 @@ the MARC fields should match the regular expression.
 
 =head2 marc_all_match(MARC_PATH, REGEX)
 
-Evaluates to true when the MARC_PATH values matches the REGEX, false otherwise.
+Evaluates to true when all MARC_PATH values matches the REGEX, false otherwise.
 
 =head1 SEE ALSO
 
diff --git a/lib/Catmandu/Fix/Condition/marc_any_match.pm b/lib/Catmandu/Fix/Condition/marc_any_match.pm
index 55e2e20..2f78190 100644
--- a/lib/Catmandu/Fix/Condition/marc_any_match.pm
+++ b/lib/Catmandu/Fix/Condition/marc_any_match.pm
@@ -45,27 +45,21 @@ Catmandu::Fix::Condition::marc_any_match - Test if a MARC (sub)field matches a v
 
    # marc_any_match(MARC_PATH,REGEX)
 
-   # Match if 245 contains the value "My funny title"
+   # Match when 245 contains the value "My funny title"
    if marc_any_match('245','My funny title')
    	add_field('my.funny.title','true')
    end
 
-   # Match if 245a contains the value "My funny title"
+   # Match when 245a contains the value "My funny title"
    if marc_any_match('245a','My funny title')
    	add_field('my.funny.title','true')
    end
 
-   # Match if at least one 650 field contains digits
+   # Match when at least one 650 field contains digits
    if marc_any_match('650','[0-9]')
      add_field('has_digits','true')
    end
 
-   # Match if /one/ of the 650 fields contain digits
-   do marc_each()
-       if marc_all_match('650','[0-9]')
-         add_field('has_digits','true')
-       end
-   end
 =head1 DESCRIPTION
 
 Evaluate the enclosing fixes only if the MARC (sub)field matches a
@@ -76,7 +70,7 @@ least one MARC fields should match the regular expression.
 
 =head2 marc_any_match(MARC_PATH, REGEX)
 
-Evaluates to true when the MARC_PATH values matches the REGEX, false otherwise.
+Evaluates to true when at least one MARC_PATH values matches the REGEX, false otherwise.
 
 =head1 SEE ALSO
 
diff --git a/lib/Catmandu/Fix/Condition/marc_match.pm b/lib/Catmandu/Fix/Condition/marc_match.pm
index 8ea21b5..b69541d 100644
--- a/lib/Catmandu/Fix/Condition/marc_match.pm
+++ b/lib/Catmandu/Fix/Condition/marc_match.pm
@@ -14,32 +14,28 @@ Catmandu::Fix::Condition::marc_match - Test if a MARC (sub)field matches a value
 
    # marc_match(MARC_PATH,REGEX)
 
-   # Match if 245 contains the value "My funny title"
+   # Match when 245 contains the value "My funny title"
    if marc_match('245','My funny title')
    	add_field('my.funny.title','true')
    end
 
-   # Match if 245a contains the value "My funny title"
+   # Match when 245a contains the value "My funny title"
    if marc_match('245a','My funny title')
    	add_field('my.funny.title','true')
    end
 
-   # Match if all 650 fields contain digits
+   # Match when all 650 fields contain digits
    if marc_match('650','[0-9]')
      add_field('has_digits','true')
    end
 
-   # Match if /one/   # Match if one of the 650 fields contain digits
-      do marc_each()
-          if marc_all_match('650','[0-9]')
-            add_field('has_digits','true')
-          end
-      end of the 650 fields contain digits
+   # Match when /one/ of the 650 fields contain digits
    do marc_each()
-       if marc_match('650','[0-9]')
-         add_field('has_digits','true')
-       end
+      if marc_all_match('650','[0-9]')
+        add_field('has_digits','true')
+      end
    end
+
 =head1 DESCRIPTION
 
 Evaluate the enclosing fixes only if the MARC (sub)field matches a
@@ -53,7 +49,7 @@ and will be deleted in the future
 
 =head2 marc_match(MARC_PATH, REGEX)
 
-Evaluates to true when the MARC_PATH values matches the REGEX, false otherwise.
+Evaluates to true when all MARC_PATH values matches the REGEX, false otherwise.
 
 =head1 SEE ALSO
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-marc-perl.git



More information about the Pkg-perl-cvs-commits mailing list