Bug 29794: (follow-up) Add license
[koha-ffzg.git] / misc / cronjobs / update_patrons_category.pl
index 86541a8..8ef7fe7 100755 (executable)
 
 use Modern::Perl;
 
-BEGIN {
-    # find Koha's Perl modules
-    # test carefully before changing this
-    use FindBin;
-    eval { require "$FindBin::Bin/../kohalib.pl" };
-}
-
 use C4::Context;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use Koha::Logger;
 use Koha::Patrons;
 use Koha::Patron::Categories;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Script -cron;
 
 =head1 NAME
@@ -47,6 +40,7 @@ update_patrons_category.pl -f=categorycode -t=categorycode
 update_patrons_category.pl --help | --man
 
 Options:
+
    --help                   brief help message
    --man                    full documentation
    -too_old                 update if over  maximum age for current category
@@ -137,12 +131,6 @@ e.g.
 --where 'email IS NULL'
 will update all patrons with no value for email
 
---where 'categorycode LIKE "%CHILD"'
-will update all patrons with a category ending in CHILD.
-
---where 'categorycode LIKE RESIDENT%'
-will update all patrons whose category does not begin with RESIDENT.
-
 =back
 
 =head1 DESCRIPTION