[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH OSSTEST v2 09/18] Toolstack: Refactor consolecmd handling
On Thu, 2015-01-22 at 11:26 +0000, Ian Campbell wrote: > On Thu, 2015-01-22 at 11:24 +0000, Ian Campbell wrote: > > On Tue, 2015-01-20 at 18:34 +0000, Ian Jackson wrote: > > > Ian Campbell writes ("[PATCH OSSTEST v2 09/18] Toolstack: Refactor > > > consolecmd handling"): > > > ... > > > > diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm > > > > index c921c20..896d949 100644 > > > > --- a/Osstest/Toolstack/xend.pm > > > > +++ b/Osstest/Toolstack/xend.pm > > > > @@ -36,5 +36,6 @@ sub new { > > > > # Defer to xl driver for most things > > > > sub destroy { return &Osstest::Toolstack::xl::destroy; } > > > > sub create { return &Osstest::Toolstack::xl::create; } > > > > +sub consolecmd { return &Osstest::Toolstack::xl::consolecmd; } > > > > > > I hesitate to suggest this, but perhaps Exporter(3pm)'s inheritance > > > feature (@ISA, I think) might do this more automatically ? > > > > Perhaps, I can't seem to find Exporter(3pm) any where either in Debian > > or online. Lots of Exporter::Lite, ::Simple, ::Heavy type stuff > > though... > > Turns out that including the 3pm confuses search enginers, searching > just for "perl Exporter" has found me what I need. It seems that "use parent" is the right way to do this these days, in so much as the following seems to be recommended and to work. I'll fold it through the series into the appropriate places. Ian. diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index d76f650..1d5d059 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -19,7 +19,9 @@ package Osstest::Toolstack::xend; use strict; use warnings; -use Osstest::Toolstack::xl; + +# Defer to xl driver for most things +use parent qw(Osstest::Toolstack::xl); sub new { my ($class, $ho, $methname,$asset) = @_; @@ -32,15 +34,6 @@ sub new { }, $class; } -# Defer to xl driver for most things -sub destroy { return &Osstest::Toolstack::xl::destroy; } -sub create { return &Osstest::Toolstack::xl::create; } -sub consolecmd { return &Osstest::Toolstack::xl::consolecmd; } -sub shutdown_wait { return &Osstest::Toolstack::xl::shutdown_wait; } -sub migrate { return &Osstest::Toolstack::xl::migrate; } -sub save { return &Osstest::Toolstack::xl::save; } -sub restore { return &Osstest::Toolstack::xl::restore; } - # xend always supported migration sub migrate_check ($) { return 0; } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |