[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST v2 12/18] Toolstack: Refactor migration support.

Ian Campbell writes ("Re: [PATCH OSSTEST v2 12/18] Toolstack: Refactor 
migration support."):
> On Thu, 2015-01-22 at 15:17 +0000, Ian Jackson wrote:
> > Magic in a different way would be:
> > 
> >   ->migrate($ts, $gho, { %$dho, Name => 'localhost' }, $timeout)
> In the caller? There is no $dho in that case. But I think maybe you
> meant $gho? (i.e. this is supposed to produce a copy of $gho with a
> different name)

Yes.  Indeed, I meant $gho.

%$gho expands to a list of (key, value, key, value, ...) which you can
feed to hash constructors like { }.

So { %$gho } is a shallow copy.  And later values for a particular key
in the list override earlier ones.

For some other examples,   git-grep '%\$'


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.