Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Difference in retrieving values from a varchar2 column and number column from DB

by GrandFather (Sage)
on Dec 03, 2013 at 13:44 UTC ( #1065423=note: print w/ replies, xml ) Need Help??


in reply to Re: Difference in retrieving values from a varchar2 column and number column from DB
in thread Difference in retrieving values from a varchar2 column and number column from DB

Do you mean the :: in return $obj->SUPER::new(@args);? SUPER calls the base class method of the object. For example:

use strict; use warnings; package Base; sub method { my ($self) = @_; my $class = ref $self; print "In Base::method(). I'm a $class instance.\n"; } package Derived; push @Derived::ISA, 'Base'; sub new { my ($class) = @_; return bless {}, $class; } sub method { my ($self) = @_; print "In Derived::method()\n"; $self->SUPER::method(); } package main; my $obj = Derived->new(); $obj->method();

Prints:

In Derived::method() In Base::method(). I'm a Derived instance
True laziness is hard work


Comment on Re^2: Difference in retrieving values from a varchar2 column and number column from DB
Select or Download Code
Re^3: Difference in retrieving values from a varchar2 column and number column from DB
by Anonymous Monk on Dec 03, 2013 at 13:48 UTC

    I am sorry for making you write an example as I referred to "the last colon-colon" in the push statement ...

    push @ipElement,(new MyPackage::NetAddr::IP::($row_ip->{IP}, '255.255. +255.255')); ...
Re^3: Difference in retrieving values from a varchar2 column and number column from DB
by Arun Kumar (Novice) on Dec 03, 2013 at 17:06 UTC

    No, the

    ::

    in

    return $obj->SUPER::new(@args);

    returns the base class method of the containing class/package.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065423]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (19)
As of 2015-07-02 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (45 votes), past polls