Details |
Last modification |
View Log
| RSS feed
| Rev |
Author |
Line No. |
Line |
| 108 |
rodolico |
1 |
#! /usr/bin/env perl
|
|
|
2 |
|
|
|
3 |
# Takes archiveIMAP.yaml and dumps to stdout as a perl definition
|
|
|
4 |
# to use this as archiveIMAP.cfg, you must change $VAR1 on the first line
|
|
|
5 |
# to $config
|
|
|
6 |
|
|
|
7 |
use warnings;
|
|
|
8 |
use strict;
|
|
|
9 |
|
|
|
10 |
use YAML::Tiny; # apt-get libyaml-tiny-perl under debian
|
|
|
11 |
use Data::Dumper;
|
|
|
12 |
|
|
|
13 |
my $config;
|
|
|
14 |
#my $temp = join( '', <> );
|
|
|
15 |
#eval $temp;
|
|
|
16 |
|
|
|
17 |
my $yaml = YAML::Tiny->read( 'archiveIMAP.yaml' );
|
|
|
18 |
$Data::Dumper::Indent = 2;
|
|
|
19 |
$Data::Dumper::Sortkeys = 1; # sorts hash keys, so consistent output
|
|
|
20 |
print Dumper( $yaml->[0] );
|
|
|
21 |
|
|
|
22 |
1;
|
|
|
23 |
|