[svn:parrot] r49055 - trunk/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Thu Sep 16 12:11:06 UTC 2010
Author: fperrad
Date: Thu Sep 16 12:11:05 2010
New Revision: 49055
URL: https://trac.parrot.org/parrot/changeset/49055
Log:
[distutils] refactor with get_value()
Modified:
trunk/runtime/parrot/library/distutils.pir
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Thu Sep 16 11:01:53 2010 (r49054)
+++ trunk/runtime/parrot/library/distutils.pir Thu Sep 16 12:11:05 2010 (r49055)
@@ -2160,17 +2160,13 @@
set $P0, 1
$P0[0] = archive
push contents, $P0
- $S0 = 'parrot-autobot:qa_rocks'
- $I0 = exists kv['smolder_credentials']
- unless $I0 goto L5
- $S0 = kv['smolder_credentials']
- L5:
+ $S0 = get_value('smolder_credentials', "parrot-autobot:qa_rocks" :named('default'), kv :flat :named)
$P0 = split ':', $S0
$P1 = $P0[0]
- push contents, "username"
+ push contents, 'username'
push contents, $P1
$P1 = $P0[1]
- push contents, "password"
+ push contents, 'password'
push contents, $P1
load_bytecode 'LWP/UserAgent.pir'
.local pmc ua, response
More information about the parrot-commits
mailing list