Swampi has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am using both the YAML and IO::All modules and am really confused about the output I am getting.
My code looks something like this:
$filePath = $ioObject->pathname; print $filePath; . . . #sets myObject attribute myPath to $filePath $myObject->myPath($filePath); Dump($myObject) > $aFile;
The print statement prints "dir/dir/dir/file.ext". However in $aFile the file path is prepended with "? >- \n ".

Any idea what that is all about? Evena suggestion about whether it is being caused by YAML or IO::All, would be good. I'm fairly sure it doesn't have anything to do with the way I am setting attributes in my object, as it only happens with attributes which are paths retrieved from IO::All objects.

Many thanks,
Swampi

Replies are listed 'Best First'.
Re: YAML and IO::All
by Fletch (Bishop) on Apr 21, 2005 at 13:08 UTC

    Actually the YAML produced would be useful to see as well because that could be slightly verbose YAML.

    --- #YAML:1.0 ? >- aFileName : >- /a/b/c/1/2/3
      It is part of the YAML description. Thanks for the tip. I should have read the YAML spec more carefully.

      Thanks for the help

Re: YAML and IO::All
by piroufreek (Acolyte) on Apr 21, 2005 at 12:54 UTC
    Without more code, I'm not sure what you are asking. Give more code... Specifically, I'd like to see where $myObject is defined/created and every other attribute in $myObject is set.

    Thanks, piroufreek