Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Pls guide me in learning in Perl Module and packages Post 302152718 by porter on Friday 21st of December 2007 01:02:38 AM
Old 12-21-2007
Do you know Perl itself first?

Go to a bookshop and get a good Perl reference book, it will save you hours of googling.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Learning CGI using Perl

hi everyone, i am learning CGI using Perl, but i am having problem to compile and run the scripts. the thing is that, when i want to compile my scripts i have to get connected to the internet and have to upload the scripts to a server and then only i can compile and run my scripts. so, can... (2 Replies)
Discussion started by: shifan
2 Replies

2. Shell Programming and Scripting

Learning Perl 3rd Edition

Does anyone know where I might be able to download the exercises from the learning perl 3rd edition book. Any URL's would be valuable! Thanks:confused: (1 Reply)
Discussion started by: bilal_aa
1 Replies

3. Shell Programming and Scripting

Replace Perl Module name in all Perl scripts

I want to replace a Perl module name in all my Perl Scripts in the cgi-bin directory. How is it possible? I have the following statement in my scripts use myUtil; I want to change it to use myUtil777; Regards, Rahul (2 Replies)
Discussion started by: rahulrathod
2 Replies

4. UNIX for Dummies Questions & Answers

pls guide this..

in what real time scenerios we write shell scripts in oracle (1 Reply)
Discussion started by: ss4u
1 Replies

5. Shell Programming and Scripting

Good learning perl Book

Can anyone suggest a good pearl book?:) (2 Replies)
Discussion started by: nygenka
2 Replies

6. Shell Programming and Scripting

Learning Perl

Folks! Anyone please explain the behavior of this program step by step. Thanks. #! /usr/bin/perl $testfile = "./testfile2"; for ( $i = 1, $i <= 5, $i++) { open ($FILE, ">", $testfile); print ($FILE "Output 1 \n"); close ($FILE); } print "The value of (4 * 2) / 2 is "; print (4 * 2)... (1 Reply)
Discussion started by: huko99
1 Replies

7. Shell Programming and Scripting

calling perl subroutine from perl expect module

All, Is it possible to call a subroutine from the perl expect module after logging to a system that is within the same program. My situation is I need to run a logic inside a machine that I'm logging in using the expect module, the logic is also available in the same expect program. Thanks,... (5 Replies)
Discussion started by: arun_maffy
5 Replies

8. AIX

LEARNING AIX - PLS GUID MY BRO 'S & SISTERS !

Hi, I am harsath , am new to UNIX- Aix ust started to learning , interested in working with servers , is it necessary to know shell scripting before learning aix, will i get job only if i know aix .... pls reply..... Thanks in advance.... (2 Replies)
Discussion started by: harsath24330
2 Replies

9. Shell Programming and Scripting

What do people think of the "Beginning Perl" book for learning Perl?

Seems like it's written out pretty well for a beginner to learn, any thoughts or recommendations for other books? I'd post the link but I can't do that yet. The book is called "Beginning Perl" by Simon Cozens (2 Replies)
Discussion started by: budfoxcat
2 Replies

10. UNIX for Dummies Questions & Answers

PERL-CGI learning

Hello All, I am actually learning PERL and more interested to learn CGI script too. Can any suggest a forum or weblink which is more helpful for a dummy CGI developer. Thanks (6 Replies)
Discussion started by: posix
6 Replies
HTML::FormHandler::Manual::Testing(3pm) 		User Contributed Perl Documentation		   HTML::FormHandler::Manual::Testing(3pm)

NAME
HTML::FormHandler::Manual::Testing - testing forms VERSION
version 0.40013 SYNOPSIS
Manual Index One of the big advantages of FormHandler compared to many other form packages is that you can test the same form that you use in your controller. DESCRIPTION
It's difficult to test forms that are instantiated in controllers with 'add_element' calls and from YAML, and that have no form class. It's one of the reasons that 'dynamic' forms generated with a field_list aren't a good idea for anything except the simplest forms. If you have a form class that contains everything that is needed for processing the form, it's really really easy to create tests for forms. Look in the FormHandler 't' directory. It's full of tests for forms. You can test that the validations work, that the database is getting updated correctly, even that the HTML that's being rendered is correct. If something isn't working correctly, it's ten times easier to debug in a test case than sitting in a controller somewhere. And when you finally start up your application and use the form, there should be very few surprises. FormHandler provides a simple function to test whether the HTML output is correct, 'is_html' in HTML::FormHandler::Test, which uses HTML::TreeBuilder. If you need to build forms that use the rendering code to produce particular output, it can be helpful. Example Here's an example of a test, originally copied from one of the DBIC model tests. But you should download the tar.gz or checkout the distribution from github and browse through the tests. use Test::More; use lib 't/lib'; use_ok( 'BookDB::Form::Book'); use_ok( 'BookDB::Schema::DB'); my $schema = BookDB::Schema::DB->connect('dbi:SQLite:t/db/book.db'); ok($schema, 'get db schema'); my $form = BookDB::Form::Book->new(schema => $schema); # This is munging up the equivalent of param data from a form my $good = { 'title' => 'How to Test Perl Form Processors', 'author' => 'I.M. Author', 'genres' => [2, 4], 'format' => 2, 'isbn' => '123-02345-0502-2' , 'publisher' => 'EreWhon Publishing', }; ok( $form->process( params => $good ), 'Good data' ); my $book = $form->item; END { $book->delete }; ok ($book, 'get book object from form'); my $num_genres = $book->genres->count; is( $num_genres, 2, 'multiple select list updated ok'); is( $form->field('format')->value, 2, 'get value for format' ); my $bad_1 = { notitle => 'not req', silly_field => 4, }; ok( !$form->process( $bad_1 ), 'bad 1' ); my $bad_2 = { 'title' => "Another Silly Test Book", 'author' => "C. Foolish", 'year' => '1590', 'pages' => 'too few', 'format' => '22', }; ok( !$form->process( $bad_2 ), 'bad 2'); ok( $form->field('year')->has_errors, 'year has error' ); ok( $form->field('pages')->has_errors, 'pages has error' ); ok( !$form->field('author')->has_errors, 'author has no error' ); ok( $form->field('format')->has_errors, 'format has error' ); my $good = { title => "Another Silly Test Book", author => "C. Foolish", year => 1999, pages => 101, format => 2 }; ok( $form->process($good), 'now form validates' ); done_testing; AUTHOR
FormHandler Contributors - see HTML::FormHandler COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Gerda Shank. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-25 HTML::FormHandler::Manual::Testing(3pm)
All times are GMT -4. The time now is 11:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy