On 6/29/07, Ramprabhu Kaliaperumal <[EMAIL PROTECTED]> wrote:
I wrote a override method 'insert' in my class, which does password
field encryption before inserting into db.

But there are some situation where I don't need to have this override
method 'insert' get executed .. and just call the super 'insert' method.

Is there is any way to by-pass the overridden method.


If you need both a new behavior and the original behavior available to
users of the class, try using a new name for the new behavior.  e.g.,
instead of what you probably have now:

sub insert {
   my $self = shift;
   [.......]
   $self->next::method(@_);
}

Do something like:

sub insert_encrypted {
   my $self = shift;
   [...]
   $self->insert(@_);
}

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to