On 10-05-17 10:35 AM, Eric Veith1 wrote:
"Bob McConnell"<r...@cbord.com>  wrote on 05/17/2010 02:26:58 PM:
>  What is the difference between this and exporting a YAML file? Where
>  would either be preferred over the other?
Except for the obvious syntax and that YAML might be easier to read for
"end users" that just happen to edit a config file, I guess there's none.
AFAIK, YML has a notation for references (i.e., let one node of the
document refer to another), too. So it all depends on the parser.

I'm not sure whether evaluating perl code would be fast than parsing YML,
but for a config file, I guess it wouldn't make much of a difference.


Unless the parser is really slow, it shouldn't matter since this is a one time event.

The thing about using Data::Dumper to store the configuration is that it is in Perl. You don't have to learn a second syntax to use it. You can change it directly by using a text editor.

The reason you have a save_config subroutine is so the end user can change the configuration by interacting with the script. You, the great Perl programmer, don't need it; you can change it directly in its file. :)


--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to