Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Data files in Perl module distributions?

by SBECK (Monk)
on Apr 13, 2012 at 14:47 UTC ( #964941=note: print w/ replies, xml ) Need Help??


in reply to Data files in Perl module distributions?

I usually do this by just storing the YAML in a perl module. So I have:

package My::Package::Data1; use YAML::Syck; my @in = <DATA>; $Data = Load(join('',@in)); __DATA__ --- key: val key: val ...
If the YAML files are really complicated, or generated from something else, or used in a non-perl context, this might not be ideal, but if they're strictly internal to the perl module, I like this since it avoids all of the complexities of handling data files on the myriad of architectures and installation setups that it might be used on.


Comment on Re: Data files in Perl module distributions?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964941]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2013-05-24 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (495 votes), past polls