problem

From: aditya (truman_at_rediffmail.com)
Date: 11/28/03


Date: 27 Nov 2003 20:48:32 -0800

Hi,
I am new to perl and I belive the following code has a problem. Can
someone tell me what? The stuff I want to add in the html page (inside
the 'if' condition below), it doesnt come at all!

Please help!

Aditya

##############################################################################
package App::Dialog::Field::Scheduling::ReoccuringAppts;
##############################################################################

use strict;
use base qw{CGI::Dialog::ContentItem};
use CGI::Dialog;
use CGI::Validator::Field;
use base qw{CGI::Dialog::MultiField};

sub new
{
        my ($type, %params) = @_;
        
        #added
        
        my $temp=$params{val};
        
        if ($temp eq '1')
        {
                        return CGI::Dialog::MultiField::new($type, %params,
                        fields => [
                        new CGI::Dialog::Field(caption => "Appointments Interval",
                                        name => "appt_Interval",
                                        choiceDelim =>',',
                                        selOptions => q{Day:0, Week:1, 2 Weeks:2, Month:3, 2 Months:4, 6
Months:5, Year:6},
                                        type => 'select',
                                        ),
                                        
                                        new App::Dialog::Field::Scheduling::Date(caption => "Termination
Date",
                                        name => "Term_date",
                                        options => FLDFLAG_REQUIRED,
                                        ),
                        ],
                );
        }
}



Relevant Pages

  • Re: best practice ... requires
    ... affect the way Perl parses your program, like strict and warnings). ... Do you know what calling a sub with & does? ... so you can see that my package is nested and I am now wondering how ...
    (comp.lang.perl.misc)
  • HASH vs Regexp
    ... use strict; ... use warnings; ... sub Regexp::matches { ... OTOH I wonder why in current perl references are not ...
    (comp.lang.perl.misc)
  • Re: How print a Hashtable with reference ?
    ... use strict; ... use warnings; ... sub printHT($) ... Perl isn't a toolbox, but a small machine shop where you ...
    (perl.beginners)
  • Re: global variables in oop
    ... > creating global values available to all packages in a Perl script... ... > use strict; ... > sub printmyheader{ ...
    (comp.lang.perl.misc)
  • Re: Finding the common textual denominator
    ... #!/usr/bin/env perl ... use warnings; ... use strict; ... sub longest_substring_in_common { ...
    (Debian-User)