diff options
| author | tmu <tmu> | 2003-06-11 13:01:06 +0000 |
|---|---|---|
| committer | tmu <tmu> | 2003-06-11 13:01:06 +0000 |
| commit | 6ab591df63943865e4baee68cf5189d324c1d4ea (patch) | |
| tree | 51c56a0eda122f3cf1b4581c8dc29e4f7bf34e28 /fml/lib | |
| parent | 48a09f41bf3d7e5aa4865f08eb302720db29089b (diff) | |
| download | fml8-6ab591df63943865e4baee68cf5189d324c1d4ea.tar.gz fml8-6ab591df63943865e4baee68cf5189d324c1d4ea.tar.bz2 fml8-6ab591df63943865e4baee68cf5189d324c1d4ea.zip | |
add check_date() for missing date field
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Filter/Header.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fml/lib/FML/Filter/Header.pm b/fml/lib/FML/Filter/Header.pm index 411e427b..0cb1f8f0 100644 --- a/fml/lib/FML/Filter/Header.pm +++ b/fml/lib/FML/Filter/Header.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Header.pm,v 1.1 2002/09/30 11:00:54 fukachan Exp $ +# $FML: Header.pm,v 1.2 2002/12/20 03:41:28 fukachan Exp $ # package FML::Filter::Header; @@ -143,6 +143,20 @@ sub check_message_id } } +# Descriptions: validate the date in the given message $msg. +# This routine checks missing date field +# Arguments: OBJ($self) OBJ($msg) HASH_REF($args) +# Side Effects: croak() +# Return Value: none +sub check_date +{ + my ($self, $msg, $args) = @_; + + if(! $msg->get('date')) { + croak( "Missing Date: field" ); + } +} + =head1 CODING STYLE |
