diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-03-01 14:26:02 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-03-01 14:26:02 +0000 |
commit | 0746ac5aa96958870d2dbf8cb13f603fd1d8600a (patch) | |
tree | 4b7d56fb9645bc6a2f779ea8d54b122bd10aa247 /xpp/perl_modules/Dahdi/Config/Gen.pm | |
parent | 3b56e264fa95afedbba57a130eb0401cd167f23a (diff) |
dahdi-perl: more defensive coding and some docs
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6056 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/perl_modules/Dahdi/Config/Gen.pm')
-rw-r--r-- | xpp/perl_modules/Dahdi/Config/Gen.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xpp/perl_modules/Dahdi/Config/Gen.pm b/xpp/perl_modules/Dahdi/Config/Gen.pm index 01d602d..556e193 100644 --- a/xpp/perl_modules/Dahdi/Config/Gen.pm +++ b/xpp/perl_modules/Dahdi/Config/Gen.pm @@ -7,7 +7,8 @@ require Exporter; use strict; sub is_true($) { - my $val = shift || die; + my $val = shift; + return undef unless defined $val; return $val =~ /^(1|y|yes)$/i; } |