<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Would it be easier to create a class that knows what you want?<br>
<br>
$target = $hosts->rsync_target($hostname);<br>
and quickly code in your own magic?<br>
<br>
<br>
-stephen<br>
<br>
<br>
<!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal</o:Template> <o:LastAuthor>Eco Warrior</o:LastAuthor> <o:Revision>2</o:Revision> <o:Created>2005-10-26T18:53:00Z</o:Created> <o:LastSaved>2005-10-26T19:28:00Z</o:LastSaved> <o:Pages>2</o:Pages> <o:Words>284</o:Words> <o:Characters>1621</o:Characters> <o:Company>EcoStream</o:Company> <o:Lines>13</o:Lines> <o:Paragraphs>3</o:Paragraphs> <o:CharactersWithSpaces>1990</o:CharactersWithSpaces> <o:Version>10.2006</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:UseMarginsForDrawingGridOrigin/> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="10
27"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
<br>
Stephen Cataldo<br>
SpaceShare.com<br>
6420 Colby St.<br>
Oakland, CA 94618<br>
(510) 520-6175<br>
<br>
Replacing Cars with Community:<br>
<small style="color: rgb(0, 51, 0);">Interested in learning more about
SpaceShare? Join our monthly newsletter list:
<a class="moz-txt-link-abbreviated" href="http://www.spaceshare.com/email_newsletter">www.spaceshare.com/email_newsletter</a></small><br>
<br>
<br>
<br>
but I suppose procrastination is False Laziness.<br>
<br>
David Alban wrote:
<blockquote
cite="mid4c714a9c0607011842ob8907d1v62fd260e84f727bd@mail.gmail.com"
type="cite">
<pre wrap="">Greetings,
Say I want to do something like:
$hosts => {
foo => {
source_tree => '/some/dir',
rsync_target => "bat:$spool_dir/foo/",
},
bar => {
source_tree => '/some/other/dir',
rsync_target => "bat:$spool_dir/bar/",
},
.
.
.
};
But I don't want to hardcode hostnames "foo" and "bar" in the
rsync_target values. Is there a way to do something like:
$hosts => {
foo => {
source_tree => '/some/dir',
rsync_target => "bat:$spool_dir/" . __KEY__ . '/',
},
bar => {
source_tree => '/some/other/dir',
rsync_target => "bat:$spool_dir/" . __KEY__ . '/',
},
.
.
.
};
That is, is there some magic string I can put in the source to
indicate to the compiler to use the value of the current hash key?
Of course, I just noticed that this ability would have to allow the
coder to specify out to what level the magic string referred. 'Cause
in my example, I wouldn't want the value substituted for __KEY__ to be
the string 'rsync_target'. :-)
Thanks,
David
</pre>
</blockquote>
</body>
</html>