Hi,

I used this syntax to get access to $self inside a profile. I basically
treated the sub that creates the form profile as a method in the class
and called it as such.  Worked like a champ.

In the run mode:

# Check edit data
my ($results, $err_page) = $self->check_rm('show_form',
                                           $self->_form_profile);


And the form profile:

# Form input validation profile
sub _form_profile
{
    my $self = shift;

    use Data::FormValidator::Constraints (qw(:closures));

    return {required
            => [ qw( first last
                     position affiliation
                     mail email phone fax
                     abstract_title abstract_file cv_file)
               ],

            optional => [ qw( phd_year other_funding) ],
            constraint_methods
            => {
                email => email(),
                phd_year => _good_phd_year(),
               },
            constraint_method_regexp_map
            => {
                qr/_file$/ => _word_pdf_file($self)
               },
   ...
}



-- 
 Celebrate The Circle   http://www.celebratethecircle.org/
 Carolina Spirit Quest  http://www.carolinaspiritquest.org/
 My LiveJournal  http://www.livejournal.com/users/labrown/
 GPG Fingerprint: 409B A409 A38D 92BF 15D9 6EEE 9A82 F2AC 69AC 07B9
 CACert.org Assurer

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to