From 44d272d9a8cff54ec21b9fb07325a0c63a5b1121 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sun, 9 Jun 2013 22:43:58 +0200 Subject: [PATCH] Use local::lib properly --- script/ndweb_fastcgi.pl | 1 + scripts/clean_cache.pl | 1 + scripts/fetchdumps.pl | 1 + scripts/ndmail.pl | 1 + scripts/ndreport.pl | 4 +++- scripts/parsealliances.pl | 1 + scripts/parsegalaxies.pl | 1 + scripts/parseplanets.pl | 1 + scripts/reset_hosts.pl | 1 + scripts/sms.pl | 2 ++ scripts/tick.pl | 1 + 11 files changed, 14 insertions(+), 1 deletion(-) diff --git a/script/ndweb_fastcgi.pl b/script/ndweb_fastcgi.pl index 20e6665..11679d1 100755 --- a/script/ndweb_fastcgi.pl +++ b/script/ndweb_fastcgi.pl @@ -1,5 +1,6 @@ #!/usr/bin/env perl +use local::lib; use Catalyst::ScriptRunner; Catalyst::ScriptRunner->run('NDWeb', 'FastCGI'); diff --git a/scripts/clean_cache.pl b/scripts/clean_cache.pl index 313bbe5..9516ef8 100755 --- a/scripts/clean_cache.pl +++ b/scripts/clean_cache.pl @@ -3,6 +3,7 @@ use strict; use warnings; +use local::lib; use FindBin; use lib "$FindBin::Bin/../lib"; diff --git a/scripts/fetchdumps.pl b/scripts/fetchdumps.pl index 6d02704..b64200f 100755 --- a/scripts/fetchdumps.pl +++ b/scripts/fetchdumps.pl @@ -22,6 +22,7 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); diff --git a/scripts/ndmail.pl b/scripts/ndmail.pl index 5f6a00e..f6fe444 100755 --- a/scripts/ndmail.pl +++ b/scripts/ndmail.pl @@ -22,6 +22,7 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); use CGI qw/:standard/; diff --git a/scripts/ndreport.pl b/scripts/ndreport.pl index 7300e01..079b3f9 100755 --- a/scripts/ndreport.pl +++ b/scripts/ndreport.pl @@ -22,6 +22,7 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); use CGI qw/:standard/; @@ -48,7 +49,8 @@ my $email = Email::Simple->new($text); my $body = encoder($email->body,'ISO-8859-15')->utf8; my $c = $dbh->prepare(q{ -SELECT coords(x,y,z) FROM current_planet_stats WHERE pid = (SELECT pid FROM users WHERE username = $1) +SELECT coords(x,y,z) FROM current_planet_stats WHERE pid = (SELECT pid FROM users WHERE username = $1 + AND uid IN (SELECT uid FROM groupmembers WHERE gid = 'M')) }); my $a = $dbh->prepare(q{ diff --git a/scripts/parsealliances.pl b/scripts/parsealliances.pl index f42414b..551dcad 100755 --- a/scripts/parsealliances.pl +++ b/scripts/parsealliances.pl @@ -22,6 +22,7 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); diff --git a/scripts/parsegalaxies.pl b/scripts/parsegalaxies.pl index f9b6af7..3334f88 100755 --- a/scripts/parsegalaxies.pl +++ b/scripts/parsegalaxies.pl @@ -22,6 +22,7 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); diff --git a/scripts/parseplanets.pl b/scripts/parseplanets.pl index 0c62298..9278fea 100755 --- a/scripts/parseplanets.pl +++ b/scripts/parseplanets.pl @@ -22,6 +22,7 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); diff --git a/scripts/reset_hosts.pl b/scripts/reset_hosts.pl index 040445b..53f82a0 100755 --- a/scripts/reset_hosts.pl +++ b/scripts/reset_hosts.pl @@ -2,6 +2,7 @@ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); diff --git a/scripts/sms.pl b/scripts/sms.pl index aef5c7d..4b063de 100755 --- a/scripts/sms.pl +++ b/scripts/sms.pl @@ -4,6 +4,8 @@ use strict; use warnings; use feature ':5.10'; +use local::lib; + use Encode; use LWP::UserAgent; diff --git a/scripts/tick.pl b/scripts/tick.pl index cf9f67a..bd2f5b0 100755 --- a/scripts/tick.pl +++ b/scripts/tick.pl @@ -2,6 +2,7 @@ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); -- 2.39.2