[mylvmbackup] Re: running perl script as hook

Hi,

On 09/05/2008 12:49 PM, Lenz Grimmer wrote:

> On 09/02/2008 09:43 PM, Boehm, Matthew wrote:
> 
>> So I’ve got a couple hooks I’d like to write but it would be best if
>> they could “inherit” all the variables and the $dbh connection handler
>> from the mylvmbackup script.  I’m no perl guru but is there some way to
>> ‘extend’ the mylvmbackup package and instead of having the runk_hook()
>> function shell out the process, have it execute the main() of my child
>> class thus instancing it and inheriting all the variables?
> 
> It's probably doable, but you would have to modify the logic that calls the
> hooks to load Perl Modules instead of forking a shell. The idea behind this
> was to allow scripts and executables written in other languages than Perl, but
> I see your point about being able to re-use the database connection handler.
> 
> Feel free to submit a bug report about this, maybe we can change it to support
> this some day :)

FWIW, I've added a note about this in a blueprint now:

https://blueprints.launchpad.net/mylvmbackup/+spec/mylvmbackup-perl-hooks

Bye,
        LenZ
-- 
------------------------------------------------------------------
 Lenz Grimmer <lenz@xxxxxxxxxxx>                             -o)
 [ICQ: 160767607 | Jabber: LenZGr@xxxxxxxxxx]                /\\
 http://www.lenzg.org/                                       V_V

Other related posts: