http://www.perlmonks.org?node_id=1065407

Arun Kumar has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I have a perl script which queries a DB table and retrieves values and then uses it in some manipulation. Initially, the datatype of the particular columns were NUMBER. But for some reasons, I have changed it to VARCHAR2. Now the problem is my code stucks at a point where I try to create object for a package using the values retrieved using the SQL query.

Perl script statement where my code stucks

push @ipElement,(new MyPackage::NetAddr::IP::($row_ip->{IP}, '255.255.255.255'));

The NEW sub routine in the called package

sub new ($$;$) { my $invocant = shift; my $type = ref($invocant) || $invocant || __PACKAGE__; my $obj = bless({}, $type); my @args = (ref($invocant)) ? $invocant->cidr() : @_; return $obj->SUPER::new(@args); }

Any help would be highly appreciated