Bug 8463 - Koha/SearchEngine/Solr/Search.pm fails perlcritic test
[koha.git] / misc / cronjobs / smsoverdues.pl
index 3e5b294..6415eb6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl
 
 #  This script loops through each overdue item, determines the fine,
 #  and updates the total amount of fines due by each user.  It relies on
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 # $Id: sendoverdues.pl,v 1.1.2.1 2007/03/26 22:38:09 tgarip1957 Exp $
 
+#use strict;
+#use warnings; FIXME - Bug 2505
+
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
@@ -37,13 +40,13 @@ BEGIN {
 use C4::Context;
 use C4::Search;
 use C4::Circulation;
-use C4::Circulation::Fines;
 use C4::Members;
 use C4::Dates qw/format_date/;
 use HTML::Template::Pro;
 use Mail::Sendmail;
 use Mail::RFC822::Address;
 use C4::SMS;
+use Carp;
 use utf8;
 my ($res,$ua);##variables for SMS
 
@@ -309,8 +312,7 @@ sub sendEmail {
 
                 
        if (not(sendmail %mail)) {       
-warn  $Mail::Sendmail::error;
-               warn "sendEmail to $to failed.";
+carp  "sendEmail to $to failed: " . $Mail::Sendmail::error;
                return 0;       
        }