[Bps-public-commit] r11104 - Shipwright/trunk/share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Mar 18 12:02:34 EDT 2008


Author: sunnavy
Date: Tue Mar 18 12:02:33 2008
New Revision: 11104

Modified:
   Shipwright/trunk/share/bin/shipwright-builder

Log:
update builder script with YAML::Tiny

Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Tue Mar 18 12:02:33 2008
@@ -9,6 +9,7 @@
 use Config;
 use Getopt::Long;
 use Cwd;
+use inc::YAML::Tiny;
 
 my $build_base = getcwd;
 
@@ -60,7 +61,9 @@
 
 $args{skip} = [ split /,\s*/, $args{skip} || '' ];
 
-my $order = parse_order( File::Spec->catfile( 'shipwright', 'order.yml' ) );
+# YAML::Tiny objects are array based.
+my $order =
+  ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'order.yml' ) ) )->[0];
 
 my $log;
 
@@ -313,18 +316,6 @@
     return $text;
 }
 
-sub parse_order {
-    my $file  = shift;
-    my $order = [];
-    open my $fh, '<', $file or die $!;
-    while (<$fh>) {
-        if (/^- (\S+)/) {
-            push @$order, $1;
-        }
-    }
-    return $order;
-}
-
 sub test {
 
     my $cmds = cmds(File::Spec->catfile( 't', 'test' ));



More information about the Bps-public-commit mailing list