CGI-FormBuilder-Source-Perl-0.01/0000755000076500007650000000000011076612122015034 5ustar evdbevdbCGI-FormBuilder-Source-Perl-0.01/Changes0000644000076500007650000000011111076611661016327 0ustar evdbevdb0.01 - 19 Oct 2008: * first release - minimal code to get it working CGI-FormBuilder-Source-Perl-0.01/lib/0000755000076500007650000000000011076612122015602 5ustar evdbevdbCGI-FormBuilder-Source-Perl-0.01/lib/CGI/0000755000076500007650000000000011076612122016204 5ustar evdbevdbCGI-FormBuilder-Source-Perl-0.01/lib/CGI/FormBuilder/0000755000076500007650000000000011076612122020416 5ustar evdbevdbCGI-FormBuilder-Source-Perl-0.01/lib/CGI/FormBuilder/Source/0000755000076500007650000000000011076612122021656 5ustar evdbevdbCGI-FormBuilder-Source-Perl-0.01/lib/CGI/FormBuilder/Source/Perl.pm0000644000076500007650000000267111076612105023125 0ustar evdbevdbpackage CGI::FormBuilder::Source::Perl; use strict; use warnings; our $VERSION = '0.01'; use File::Slurp; =head1 NAME CGI::FormBuilder::Source::Perl - read FormBuilder config from Perl syntax files =head1 SYNOPSIS my $form = CGI::FormBuilder->new( source => { type => 'Perl', source => '/path/to/form_config.pl', } ); =head1 DESCRIPTION This module allows you to specify the config for a L object using Perl syntax. The contents of the config file will be Ced and the hash ref returned will be used as the config for the object. =cut sub new { my $self = shift; my $class = ref($self) || $self; my %opt = @_; return bless \%opt, $class; } sub parse { my $self = shift; my $file = shift || $self->{source}; my $content = read_file($file); my $config = eval $content; die "ERROR in C:FB:Source::Perl config file '$file': $@" if $@; # FIXME - add caching and smarter checking return wantarray ? %$config : $config; } =head1 SEE ALSO L, L, =head1 AUTHOR Copyright (c) 2008 Edmund von der Burg . All Rights Reserved. Based on the module L This module is free software; you may copy this under the terms of the GNU General Public License, or the Artistic License, copies of which should have accompanied your Perl kit. =cut 1; CGI-FormBuilder-Source-Perl-0.01/Makefile.PL0000644000076500007650000000042411076611500017005 0ustar evdbevdbuse ExtUtils::MakeMaker; use strict; use warnings; WriteMakefile( NAME => 'CGI::FormBuilder::Source::Perl', VERSION_FROM => 'lib/CGI/FormBuilder/Source/Perl.pm', PREREQ_PM => { 'CGI::FormBuilder' => 0, 'File::Slurp' => 0, }, ); CGI-FormBuilder-Source-Perl-0.01/MANIFEST0000644000076500007650000000026411076612122016167 0ustar evdbevdbChanges lib/CGI/FormBuilder/Source/Perl.pm Makefile.PL MANIFEST This list of files t/basics.t TODO META.yml Module meta-data (added by MakeMaker) CGI-FormBuilder-Source-Perl-0.01/META.yml0000644000076500007650000000062311076612122016306 0ustar evdbevdb--- #YAML:1.0 name: CGI-FormBuilder-Source-Perl version: 0.01 abstract: ~ license: ~ generated_by: ExtUtils::MakeMaker version 6.32 distribution_type: module requires: CGI::FormBuilder: 0 File::Slurp: 0 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 CGI-FormBuilder-Source-Perl-0.01/t/0000755000076500007650000000000011076612122015277 5ustar evdbevdbCGI-FormBuilder-Source-Perl-0.01/t/basics.t0000644000076500007650000000016111076612105016727 0ustar evdbevdb#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; use_ok 'CGI::FormBuilder::Source::Perl'; CGI-FormBuilder-Source-Perl-0.01/TODO0000644000076500007650000000013111076611655015531 0ustar evdbevdbadd caching - make it optional from the config returned add tests add some examples