[vhffs-dev] [1147] We can't return from outside a subroutine, it seems obvious, doesn' t it?

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1147
Author:   beuss
Date:     2008-02-04 11:40:31 +0000 (Mon, 04 Feb 2008)

Log Message:
-----------
We can't return from outside a subroutine, it seems obvious, doesn't it?

Modified Paths:
--------------
    trunk/vhffs-robots/src/mail_createboxes.pl
    trunk/vhffs-robots/src/mail_deleteboxes.pl


Modified: trunk/vhffs-robots/src/mail_createboxes.pl
===================================================================
--- trunk/vhffs-robots/src/mail_createboxes.pl	2008-02-04 11:14:16 UTC (rev 1146)
+++ trunk/vhffs-robots/src/mail_createboxes.pl	2008-02-04 11:40:31 UTC (rev 1147)
@@ -41,9 +41,9 @@
 use Vhffs::Main;
 
 my $vhffs = init Vhffs::Main;
-return 1 unless defined $vhffs;
+die('Unable to initialize VHFFS main object') unless defined $vhffs;
 my $mailconf = $vhffs->get_config->get_service('mail');
-return 1 unless ( defined $mailconf && defined $mailconf->{'boxes_uid'} && $mailconf->{'boxes_gid'} );
+die('Unable to find mail configuration (boxes_uid/boxes_gid)') unless ( defined $mailconf && defined $mailconf->{'boxes_uid'} && $mailconf->{'boxes_gid'} );
 
 Vhffs::Robots::lock( $vhffs , 'mail' );
 

Modified: trunk/vhffs-robots/src/mail_deleteboxes.pl
===================================================================
--- trunk/vhffs-robots/src/mail_deleteboxes.pl	2008-02-04 11:14:16 UTC (rev 1146)
+++ trunk/vhffs-robots/src/mail_deleteboxes.pl	2008-02-04 11:40:31 UTC (rev 1147)
@@ -40,9 +40,9 @@
 use Vhffs::Main;
 
 my $vhffs = init Vhffs::Main;
-return 1 unless defined $vhffs;
+die('Unable to initialize VHFFS main object') unless defined $vhffs;
 my $mailconf = $vhffs->get_config->get_service('mail');
-return 1 unless defined $mailconf;
+die('Unable to find mail configuration (boxes_uid/boxes_gid)') unless defined $mailconf;
 
 Vhffs::Robots::lock( $vhffs , 'mail' );
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/