Index: trunk/ippScripts/scripts/phase4_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/phase4_overlap.pl	(revision 11829)
+++ trunk/ippScripts/scripts/phase4_overlap.pl	(revision 11837)
@@ -32,10 +32,11 @@
 use Pod::Usage qw( pod2usage );
 
-my ($det_id, $dbname, $workdir, $no_update);
+my ($p4_id, $dbname, $workdir, $no_update, $no_op);
 GetOptions(
     'p4_id|i=s'         => \$p4_id, # Phase 4 identifier
     'dbname|d=s'        => \$dbname, # Database name
     'workdir|w=s'       => \$workdir, # Working directory, for output files
-    'no-update'         => \$no_update
+    'no-update'         => \$no_update,	# Don't update the database?
+    'no-op'             => \$no_op, # Don't do any operations
 ) or pod2usage( 2 );
 
@@ -67,4 +68,5 @@
     }
 
+    my $mdcParser = PS::IPP::Metadata::Config->new;	# Parser for metadata config files
     my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
 	&my_die("Unable to parse metadata config doc", $p4_id, $PS_EXIT_PROG_ERROR);
@@ -73,17 +75,21 @@
 }
 
+unless ($no_op) {
+
 ### Calculates, in some as-yet unknown way the overlaps between imfiles and skycells
 
-# Add in the skycell and tesselation for each imfile
-foreach my $imfile (@$imfiles) {
-    $imfile->{skycell_id} = 'default';
-    $imfile->{tess_id} = 'default';
+} else {
+    # Add in the skycell and tesselation for each imfile
+    foreach my $imfile (@$imfiles) {
+	$imfile->{skycell_id} = 'default';
+	$imfile->{tess_id} = 'default';
+    }
 }
-
+    
 
 # Generate a MDC file with the overlaps
 $workdir = $ipprc->convert_filename_absolute( $workdir );
-my $overlapName = File::Spec->catfile( $workdir, $p4_id . ".overlap.mdc" ); 
-open my $overlapFile "> $overlapName" or
+my $overlapName = File::Spec->catfile( $workdir, $p4_id . '.overlap.mdc' ); 
+open my $overlapFile, "> $overlapName" or
     &my_die("Unable to open mdc file $overlapName", $p4_id, $PS_EXIT_DATA_ERROR);
 print $overlapFile "p4SkyCellMap MULTI\n\n";
