in reply to Re: PL_rsfp_filters - what does it contain ?
in thread PL_rsfp_filters - what does it contain ?

thanks, Anno!
i search aroung PL_rsfp_filters but forget about av_len()
as i see in sources number of array's elements is always (av_len() + 1). so i can use statement like:
if ( (av_len(PL_rsfp_filters) + 1) > 1 )
that is equal to already founded checking:
if ( av_len(PL_rsfp_filters) > 0 )
  • Comment on Re^2: PL_rsfp_filters - what does it contain ?

Replies are listed 'Best First'.
Re^3: PL_rsfp_filters - what does it contain ?
by Anno (Deacon) on Mar 17, 2007 at 15:08 UTC
    i search aroung PL_rsfp_filters but forget about av_len()

    Ah yes, that's known as an XY problem: You asked (first yourself, then the Perl Monks) about the content of PL_rsfp_filters (that's X), but your problem was understanding av_len() (Y). Good thing you mentioned av_len() in the body of your query. It might have been unanswerable otherwise.

    if ( av_len(PL_rsfp_filters) > 0 )

    Right, that checks for two or more filters. In view of the problem you had with the statement, it probably deserves a comment:

    if ( av_len(PL_rsfp_filters) > 0 ) { /* We only deal with a single filter */
    Anno

    Update: Identified X and Y in the XY problem