Bug 17600: Standardize our EXPORT_OK
[srvgit] / misc / cronjobs / check-url-quick.pl
index f9b1c32..b9108a6 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
+
+use Koha::Script -cron;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio );
 use AnyEvent;
-use AnyEvent::HTTP;
+use AnyEvent::HTTP qw( http_request );
+use Encode qw( encode_utf8 );
 
 my ( $verbose, $help, $html ) = ( 0, 0, 0 );
 my ( $host,    $host_intranet ) = ( '', '' );
@@ -96,6 +99,7 @@ sub check_all_url {
                         my $url = $field->subfield('u');
                         next unless $url;
                         $url = "$host/$url" unless $url =~ /^http/i;
+                        $url = encode_utf8($url);
                         $count++;
                         http_request(
                             HEAD    => $url,