[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] UserDB functions
On Thu, Apr 19, 2001 at 06:56:21PM +0300, Grigoriy G. Vovk wrote:
> I use existing database, and information about clients (which can be
> person or company) are in the different tables.
> I want to override new_account function.
> How it should be looking, like this -
>
> GlobalSub <<EOF
> sub new_account {
> package Vend::Module;
> use MyModule;
> sub new_account {
> &MyModule::new_account($Values->{name},
> $Values->{password});
> }
> }
> EOF
> where MyModule is a name of a file without .pm
>
> Is it ok?
Not quite, that would be just use Module;
You **probably** don't want the package Vend::Module there
either. That would be in the Module.pm file.
I'd suggest you NOT put the Module in lib/Vend but
somewhere else so when you upgrade and blow away lib/Vend
it does not vanish. Check @INC for convenient location.
For example:
UserTag profile HasEndTag
UserTag profile Routine <<EOF
sub {
require MV::Opts;
require MV::Profiles;
my(@OUT,%cookie,%opt,$values);
$values=$Vend::Session->{values};
&MV::Opts::mv_opts(\%opt,$values,\%cookie);
$opt{profile}=$_[0];
# ::logGlobal("profile routine from profile ($opt{profile})");
@OUT=@{&MV::Profiles::page(\%opt,$values)};
return join "\n",@OUT;
}
EOF
>
> my best regards,
> -----------------------------
> Grigoriy G. Vovk
>
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
--
Christopher F. Miller, Publisher cfm@maine.com
MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039
1.207.657.5078 http://www.maine.com/
Content management, electronic commerce, internet integration, Debian linux
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users