DBIx::XML::DataLoader::IsDefined
use DBIx::XML::DataLoader::IsDefined; my $test_a=0; my $test_b=""; if(defined $test_a){print "TEST A:", $test_a, "\n";} if(defined $test_b){print "TEST B:", $test_b, "\n";} my $value_a=DBIx::XML::DataLoader::IsDefined->verify($test_a); my $value_b=DBIx::XML::DataLoader::IsDefined->verify($test_b); if(defined $value_a){print "VALUE TEST A:", $value_a, "\n";} if(defined $value_b){print "VALUE TEST B:", $value_b, "\n";}
use DBIx::XML::DataLoader::IsDefined; my $d=DBIx::XML::DataLoader::IsDefined->new(); my $test_a=0; my $test_b=""; if(defined $test_a){print "TEST A:", $test_a, "\n";} if(defined $test_b){print "TEST B:", $test_b, "\n";} my $value_a=$d->verify($test_a); my $value_b=$d->verify($test_b); if(defined $value_a){print "VALUE TEST A:", $value_a, "\n";} if(defined $value_b){print "VALUE TEST B:", $value_b, "\n";}
TEST A:0 TEST B: VALUE TEST A:0
This module is used primarily inside DBIx::XML::DataLoader. It checks to see if a node value is the number zero or if the variable is defined but empty. If the variable is defined but empty then undef is returned by the module.
To install DBIx::XML::DataLoader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::XML::DataLoader
CPAN shell
perl -MCPAN -e shell install DBIx::XML::DataLoader
For more information on module installation, please visit the detailed CPAN module installation guide.