[Catalyst] YAML Config

Oleg Pronin syber.rus at gmail.com
Tue Jul 24 14:56:26 GMT 2007


YAML::Syck && YAML::XS supports them.
The problem is in aliases.
At yaml.org specification i found only simple examples like "var2: *var1".
But i
need to concatenate *var1 with something ($var2 =3D $var1 . '/subdir').
This code is a syntax error on all three parsers:
var2: *var/subdir
var2: *var /subdir
etc

I didn't find it in specification.
YAML::XS is the most advanced Yaml parser supporting Yaml 1.1, but it is not
used by Catalyst.



2007/7/24, Ash Berlin <ash_cpan at firemirror.com>:
>
> Oleg Pronin wrote:
> >     >I don't even know what those do. Why do you want them?
> >
> >
> > &anchors are used to define an anchor on variable.
> > *aliases are used to insert previously defined anchor's value.
> >
> > For example,
> > root_dir: &root /very/long/path/to/root/dir
> > root_dir2: *root
> >
> > print MyApp->config->{root_dir2}; # /very/long/path/to/root/dir
> >
> >
>
> Good reason for using them.
>
> Shame it appears nothing in perl supports them. If you want to use them
> i suggest you submit a patch against the YAML module of your choice.
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070724/9ceb9=
ac8/attachment-0001.htm


More information about the Catalyst mailing list