which is more to type than:<code> Die( "<condition> or ProjectName::Die( $gddref, "message content" ); # in package ProjectName sub Die my $gddref = shift; # ref. to global data dictionary my $content = shift; my $UICB = $gddref -> { CB }{ UIOUT }; my $logref = $gddref -> { FH }{ LOGOUT }; &$UICB( "FATAL ERROR: $content" ); # which may or may not end up # using die depending # on the user interface print $logref ( ProjFormatTime( localtime() ) . ": $content\n"; exit 1; # having met such particular messaging requirements # die with or without "\n" is no longer an obvious idea. }
-M
Free your mind
In reply to Re^5: unless/if
by Moron
in thread unless/if
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |