title: YAML data exchange issues between Perl and Ruby
body: <p>I'm having trouble with data being exchanged between Perl and Ruby via YAML. I have some values that look like number:number, such as <code>1:16</code>.</p>
  
  <p>Perl's YAML libraries (Tiny and XS) encode this as <code>1:16</code> without quotes. Ruby's YAML library (Psych) does not interpret this as a string, but instead somehow becomes the Fixnum value <code>4560</code>. I can't figure out how to fix this conversion issue on either side.</p>
  
  <p>Every value in the YAML for my use case should be an object or string.  So, I could tell the Perl YAML library to quote all values, if such an option existed. Or is there any way to tell the Ruby YAML library to interpret all values as strings? Any ideas?  </p>
  
  <p>Changing the language on either side is not logistically an option.</p>
  
  <p>Perl:</p>
  
  <pre><code>use YAML::XS qw(DumpFile);
  my $foo={'abc'=&gt;'1:16'};
  DumpFile('test.yaml',$foo);
  </code></pre>
  
  <p>Ruby:</p>
  
  <pre><code>require('yaml')
  foo=YAML.load_file('test.yaml')
  puts(foo['abc'])
  </code></pre>
  
  <p>The Ruby code will print <code>4560</code>. One of the comments figured out how you get <code>4560</code> from <code>1:16</code>, it's 1 hour, 16 minutes converted to seconds.  Uh, okay.</p>