YAML::Tiny version 1.73 eats up all comment lines even when they belong to a block of text:
$ cat prova.yml
whatever: |
#!/bin/bash
env
# another comment
# indented comment
# back from indentation
$ perl -MYAML::XS=LoadFile -E 'say LoadFile("prova.yml")->{whatever}'
#!/bin/bash
env
# another comment
# indented comment
# back from indentation
$ perl -MYAML::Tiny=LoadFile -E 'say LoadFile("prova.yml")->{whatever}'
env