| 1 | package DBIx::XML::DataLoader::IsDefined; | ||
| 2 | |||
| 3 | |||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | |||
| 7 | ############# | ||
| 8 | sub new{ | ||
| 9 | ######## | ||
| 10 | my $self=shift; | ||
| 11 | bless \$self; | ||
| 12 | |||
| 13 | ###### | ||
| 14 | }# end sub new | ||
| 15 | ############# | ||
| 16 | |||
| 17 | sub verify{ | ||
| 18 | if((scalar @_) < 2){return undef;} | ||
| 19 | my $self = shift; | ||
| 20 | my $variable=shift; | ||
| 21 | |||
| 22 | {no warnings; # warning are turned off here because we are playing with a var that might not be declared | ||
| 23 | |||
| 24 | my $cnt=split //, $variable; | ||
| 25 | if($cnt == 0){return undef;} | ||
| 26 | } | ||
| 27 | return $variable; | ||
| 28 | |||
| 29 | } | ||
| 30 | 1; | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | __END__ |