[Dbix-class] How to bypass a overidden method?

Jess Robinson castaway at desert-island.me.uk
Fri Jun 29 16:52:55 GMT 2007



On Fri, 29 Jun 2007, Ramprabhu Kaliaperumal 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.
>


1) Have the logic to "not call new code in insert", in your overridden 
insert method

2) call the overridden insert method something other than insert, i.e.
sub myinsert
{
   ## do stuff
   $self->insert();
}

and call that instead

Jess




More information about the Dbix-class mailing list