The New Developer

 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Cartoons for Geeks The New Developer
# 1  
Old 04-25-2012
The New Developer

2012-04-25T22:19:33+02:00
Image





Tweet
Image Image Image Image
Image

Source...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Developer Needed

Hello programmers, A small team of developers and myself have started a VoIP project for the gaming community. We are all working volunteerily to make the application. We all have experience in what we do, but we have hit a dead end. After setting up registration, login, and the custom graphic UI,... (3 Replies)
Discussion started by: suzi9spal
3 Replies

2. OS X (Apple)

what are OS X Developer tools .

hi all, what are OS X Developer tools. Whether Mac oS x developer tools are same as unix os x developer tools. problem .. i am trying to tomcat as daemon process. i referred Installing Apache Tomcat 6 on Mac OS X 10.5 Leopard and started to run tomcat as daemon process in unix environment.... (1 Reply)
Discussion started by: deepakl28
1 Replies
Login or Register to Ask a Question
CGI::FormBuilder::Source(3pm)				User Contributed Perl Documentation			     CGI::FormBuilder::Source(3pm)

NAME
CGI::FormBuilder::Source - Source adapters for FormBuilder SYNOPSIS
# Define a source adapter package CGI::FormBuilder::Source::Whatever; 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}; # open the file and parse it, or whatever my %formopt; open(F, "<$file") || die "Can't read $file: $!"; while (<F>) { # ... do stuff to the line ... $formopt{$fb_option} = $fb_value; } # return hash of $form options return wantarray ? %formopt : \%formopt; } DESCRIPTION
This documentation describes the usage of FormBuilder sources, as well as how to write your own source adapter. An external source is invoked by using the "source" option to the top-level "new()" method: my $form = CGI::FormBuilder->new( source => 'source_file.conf' ); This example points to a filename that contains a file following the "CGI::FormBuilder::Source::File" layout. Like with the "template" option, you can also specify "source" as a reference to a hash, allowing you to use other source adapters: my $form = CGI::FormBuilder->new( fields => @fields, source => { type => 'File', source => '/path/to/source.conf', } ); The "type" option specifies the name of the source adapter. Currently accepted types are: File - CGI::FormBuilder::Source::File In addition to one of these types, you can also specify a complete package name, in which case that module will be autoloaded and its "new()" and "parse()" routines used. For example: my $form = CGI::FormBuilder->new( fields => @fields, source => { type => 'My::Source::Module', somefile => '/path/to/source.conf', } ); All other options besides "type" are passed to the constructor for that source module verbatim, so it's up to you and/or the source module on how these additional options should be handled. SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Source::File, REVISION
$Id: Source.pm 100 2007-03-02 18:13:13Z nwiger $ AUTHOR
Copyright (c) Nate Wiger <http://nateware.com>. All Rights Reserved. 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. perl v5.14.2 2011-09-16 CGI::FormBuilder::Source(3pm)