Christopher Berning

NAME

        DBIx::XML::DataLoader::IsDefined

SYNOPSIS

        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";}   
or
        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";}

The results

        TEST A:0
        TEST B:
        VALUE TEST A:0

DESCRIPTION

        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.