Subversion Repositories camp_sysinfo_client_3

Rev

Rev 144 | Rev 194 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 161
Line 179... Line 179...
179
      if ( $contents =~ m/^---(\s*#.*)?$/m ) {
179
      if ( $contents =~ m/^---(\s*#.*)?$/m ) {
180
         print "Reading $filename as YAML\n";
180
         print "Reading $filename as YAML\n";
181
         #print "Contents are:\n\n=====================$contents\n=====================\n";
181
         #print "Contents are:\n\n=====================$contents\n=====================\n";
182
         # this is a yaml file
182
         # this is a yaml file
183
         #$contents = YAML::Tiny->read( $config );
183
         #$contents = YAML::Tiny->read( $config );
-
 
184
         # try to load the contents into $config, and warn if there is a problem.
184
         $config = Load( $contents );
185
         eval( $config = Load( $contents ) ); warn $@ if $@;
185
      } elsif ( $contents =~ m/\$clientName/ ) {
186
      } elsif ( $contents =~ m/\$clientName/ ) {
186
         # this is old style
187
         # this is old style
187
         print "Reading $filename as old school file\n";
188
         print "Reading $filename as old school file\n";
188
         my $clientName = '';
189
         my $clientName = '';
189
         my $serialNumber = '';
190
         my $serialNumber = '';