Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Pure Perl Configuration File

View app.conf
1 2 3 4 5 6 7 8 9 10 11
{
database => 'donut',
user => 'homer',
password => 'simpson',
 
quote => {
give => 'me',
the => 'number',
for => 911,
},
}
View app.conf
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env perl
 
use strict;
use warnings;
use Data::Dumper;
use Safe;
 
my $config = Safe->new->rdo( 'app.conf' );
die "Couldn't parse config file: $@" if $@;
die 'Invalid config file' if not defined $config or ref $config ne 'HASH';
 
print Dumper $config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.