[libcatmandu-perl] 40/46: Adding more POD
Jonas Smedegaard
dr at jones.dk
Tue Oct 14 13:52:55 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.9205
in repository libcatmandu-perl.
commit d314c5cceb667c16c3079298ddddc6103da56db4
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date: Fri Oct 3 11:24:13 2014 +0200
Adding more POD
---
lib/Catmandu/Env.pm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/lib/Catmandu/Env.pm b/lib/Catmandu/Env.pm
index 4541c1d..b33802f 100644
--- a/lib/Catmandu/Env.pm
+++ b/lib/Catmandu/Env.pm
@@ -1,5 +1,42 @@
package Catmandu::Env;
+=head1 NAME
+
+Catmandu::Env - A catmandu configuration file loader
+
+=head1 SYNOPSIS
+
+ use Catmandu::Env;
+
+ my $env = Catmandu::Env->new(load_paths => [ '/etc/catmandu '] );
+ my $env = Catmandu::Env->new(load_paths => [ ':up'] );
+
+ my $store = $env->store('mongodb');
+ my $importer = $env->importer('loc');
+ my $exporter = $env->exporter('europeana');
+ my $fixer = $env->fixer('my_fixes');
+ my $conf = $env->config;
+
+=head1 DESCRIPTION
+
+This class loads the catmandu.*.pl, catmandy.*.json, catmandy.*.yml and catmandy.*.yaml file from
+all provided load_paths. Programmers are adviced *not* to use this class directly
+but use the equivalent functionality provided in the Catmandu package:
+
+ Catmandu->load('/etc/catmandu');
+ Catmandu->load(':up');
+
+ my $store = Catmandu->store('mongodb');
+ my $importer = Catmandu->importer('loc');
+ my $exporter = Catmandu->exporter('europeana');
+ my $fixer = Catmandu->fixer('my_fixes');
+ my $conf = Catmandu->config;
+
+=head1 SEE ALSO
+
+L<Catmandu>
+
+=cut
use Catmandu::Sane;
use Catmandu::Util qw(require_package use_lib read_yaml read_json :is :check);
use Catmandu::Fix;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-perl.git
More information about the Pkg-perl-cvs-commits
mailing list