From 417d88924d2037d93f619572881f1f10f4273a99 Mon Sep 17 00:00:00 2001 From: karchnu Date: Thu, 21 Jan 2016 20:52:59 +0100 Subject: [PATCH] utf8 without env vars --- cli/get_domain.pl | 3 ++- cli/get_domains.pl | 3 ++- cli/get_users.pl | 1 + cli/toggle_admin.pl | 3 ++- cli/user_add.pl | 3 ++- cli/user_auth.pl | 3 ++- cli/user_del.pl | 3 ++- cli/user_update_passwd.pl | 2 ++ cli/zone_add.pl | 3 ++- cli/zone_del.pl | 3 ++- lib/MyWeb/App.pm | 3 ++- lib/rt/admin.pm | 1 + lib/rt/adminfake.pm | 1 + lib/rt/domain.pm | 1 + lib/rt/domainfake.pm | 1 + lib/rt/root.pm | 1 + lib/rt/rootfake.pm | 1 + lib/rt/user.pm | 1 + lib/rt/userfake.pm | 1 + lib/testapp.pl | 3 ++- 20 files changed, 31 insertions(+), 10 deletions(-) diff --git a/cli/get_domain.pl b/cli/get_domain.pl index 14b9496..6f8c866 100644 --- a/cli/get_domain.pl +++ b/cli/get_domain.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); @@ -9,7 +11,6 @@ use lib './lib/'; use configuration ':all'; use encryption ':all'; use app; -use utf8; if( @ARGV != 1 ) { say "usage : ./$0 domain"; diff --git a/cli/get_domains.pl b/cli/get_domains.pl index ce34331..6f7aea6 100644 --- a/cli/get_domains.pl +++ b/cli/get_domains.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; #use DNS::ZoneParse; @@ -10,7 +12,6 @@ use Data::Dump qw( dump ); use lib './lib/'; use configuration ':all'; use app; -use utf8; if( @ARGV != 0 ) { say "usage : ./$0"; diff --git a/cli/get_users.pl b/cli/get_users.pl index 8f19214..f5957c5 100644 --- a/cli/get_users.pl +++ b/cli/get_users.pl @@ -2,6 +2,7 @@ use v5.14; use autodie; use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); diff --git a/cli/toggle_admin.pl b/cli/toggle_admin.pl index 487e22a..6797e4d 100644 --- a/cli/toggle_admin.pl +++ b/cli/toggle_admin.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); @@ -9,7 +11,6 @@ use lib './lib/'; use configuration ':all'; use encryption ':all'; use app; -use utf8; if( @ARGV != 1 ) { say "usage : ./$0 login"; diff --git a/cli/user_add.pl b/cli/user_add.pl index a2eb81a..b538361 100644 --- a/cli/user_add.pl +++ b/cli/user_add.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); @@ -9,7 +11,6 @@ use lib './lib/'; use configuration ':all'; use encryption ':all'; use app; -use utf8; if( @ARGV != 2 ) { say "usage : ./$0 login passwd"; diff --git a/cli/user_auth.pl b/cli/user_auth.pl index 111aa9a..50884fa 100644 --- a/cli/user_auth.pl +++ b/cli/user_auth.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); @@ -9,7 +11,6 @@ use lib './lib/'; use configuration ':all'; use encryption ':all'; use app; -use utf8; if( @ARGV != 0 && @ARGV != 2 ) { say "usage : ./$0 [ login passwd ]"; diff --git a/cli/user_del.pl b/cli/user_del.pl index 0343713..8d36824 100644 --- a/cli/user_del.pl +++ b/cli/user_del.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); @@ -8,7 +10,6 @@ use Data::Dump qw( dump ); use lib './lib/'; use configuration ':all'; use app; -use utf8; if( @ARGV != 1 ) { say "usage : ./$0 user"; diff --git a/cli/user_update_passwd.pl b/cli/user_update_passwd.pl index a981fb5..e2745fe 100644 --- a/cli/user_update_passwd.pl +++ b/cli/user_update_passwd.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use Data::Dump qw( dump ); diff --git a/cli/zone_add.pl b/cli/zone_add.pl index 280c6b7..0f62397 100644 --- a/cli/zone_add.pl +++ b/cli/zone_add.pl @@ -1,13 +1,14 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use lib './lib/'; use configuration ':all'; use encryption ':all'; use app; -use utf8; if( @ARGV != 2 ) { say "usage : ./$0 login ndd "; diff --git a/cli/zone_del.pl b/cli/zone_del.pl index f7fd6c2..b5d2739 100644 --- a/cli/zone_del.pl +++ b/cli/zone_del.pl @@ -1,13 +1,14 @@ #!/usr/bin/perl -w use v5.14; use autodie; +use utf8; +use open qw/:std :utf8/; use Modern::Perl; use lib './lib/'; use configuration ':all'; use encryption ':all'; use app; -use utf8; if( @ARGV != 1 ) { say "usage : ./$0 ndd "; diff --git a/lib/MyWeb/App.pm b/lib/MyWeb/App.pm index 28544af..2d63f0d 100644 --- a/lib/MyWeb/App.pm +++ b/lib/MyWeb/App.pm @@ -3,6 +3,8 @@ package MyWeb::App; use v5.14; use strict; use warnings; +use utf8; +use open qw/:std :utf8/; use Dancer2; use Dancer2::Plugin::Deferred; @@ -10,7 +12,6 @@ use File::Basename; #use Storable qw( freeze thaw ); #$Storable::Deparse = true; #$Storable::Eval=true; -use utf8; use YAML::XS; use configuration ':all'; diff --git a/lib/rt/admin.pm b/lib/rt/admin.pm index 0962b12..1471866 100644 --- a/lib/rt/admin.pm +++ b/lib/rt/admin.pm @@ -3,6 +3,7 @@ package rt::admin; use configuration ':all'; use app; use utf8; +use open qw/:std :utf8/ use Data::Dump qw( dump ); diff --git a/lib/rt/adminfake.pm b/lib/rt/adminfake.pm index f96b889..a08cb10 100644 --- a/lib/rt/adminfake.pm +++ b/lib/rt/adminfake.pm @@ -3,6 +3,7 @@ package rt::adminfake; use configuration ':all'; use app; use utf8; +use open qw/:std :utf8/ use Data::Dump qw( dump ); diff --git a/lib/rt/domain.pm b/lib/rt/domain.pm index e73cdbb..555f7ac 100644 --- a/lib/rt/domain.pm +++ b/lib/rt/domain.pm @@ -6,6 +6,7 @@ use encryption ':all'; use util ':all'; use app; use utf8; +use open qw/:std :utf8/ use Dancer ':syntax'; use Data::Dump qw( dump ); use Data::Validate::IP qw(is_ipv4 is_ipv6); diff --git a/lib/rt/domainfake.pm b/lib/rt/domainfake.pm index 25e81be..851cdb0 100644 --- a/lib/rt/domainfake.pm +++ b/lib/rt/domainfake.pm @@ -6,6 +6,7 @@ use encryption ':all'; use util ':all'; use app; use utf8; +use open qw/:std :utf8/ use Dancer ':syntax'; use Data::Dump qw( dump ); use Data::Validate::IP qw(is_ipv4 is_ipv6); diff --git a/lib/rt/root.pm b/lib/rt/root.pm index 20ee162..df727ec 100644 --- a/lib/rt/root.pm +++ b/lib/rt/root.pm @@ -3,6 +3,7 @@ package rt::root; use configuration ':all'; use app; use utf8; +use open qw/:std :utf8/ use Exporter 'import'; # what we want to export eventually diff --git a/lib/rt/rootfake.pm b/lib/rt/rootfake.pm index 45d6281..3de9085 100644 --- a/lib/rt/rootfake.pm +++ b/lib/rt/rootfake.pm @@ -3,6 +3,7 @@ package rt::rootfake; use configuration ':all'; use app; use utf8; +use open qw/:std :utf8/ use Exporter 'import'; # what we want to export eventually diff --git a/lib/rt/user.pm b/lib/rt/user.pm index c8c29d1..f93ce26 100644 --- a/lib/rt/user.pm +++ b/lib/rt/user.pm @@ -5,6 +5,7 @@ use configuration ':all'; use encryption ':all'; use app; use utf8; +use open qw/:std :utf8/ use YAML::XS; diff --git a/lib/rt/userfake.pm b/lib/rt/userfake.pm index bf94c9b..8e576b4 100644 --- a/lib/rt/userfake.pm +++ b/lib/rt/userfake.pm @@ -5,6 +5,7 @@ use configuration ':all'; use encryption ':all'; use app; use utf8; +use open qw/:std :utf8/ use YAML::XS; diff --git a/lib/testapp.pl b/lib/testapp.pl index 5ae03b2..19fcc93 100644 --- a/lib/testapp.pl +++ b/lib/testapp.pl @@ -2,9 +2,10 @@ use v5.14; use strict; use warnings; +use utf8; +use open qw/:std :utf8/; use File::Basename; -use utf8; use YAML::XS; use configuration ':all'; use util ':all';