in reply to Re: Data::FormValidator, Not
in thread Data::FormValidator, Not

Of course, you can skip the temporary variable using
my ($valids, $missings, $invalids, $unknowns) = Data::FormValidator->validate( scalar($q->Vars), $profile);
Do those couple extra characters warrant a patch? Shrug.. Well, YMMV. Update: it obviously does - something new learned for the day.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: Data::FormValidator, Not
by impossiblerobot (Deacon) on Sep 19, 2002 at 20:28 UTC

    Although eliminating the temporary variable would work for the simplest case, Data::FormValidator does more than just validate data; it also applies filters to the data. Without the temporary variable, you're throwing away your filtered data.

    Therefore, the need for the patch: to filter the CGI object data directly, rather than in a separate data structure. :-)


    Impossible Robot