in reply to Re: Re: Inline::Files bug?
in thread Inline::Files bug?

Of course $CACHE is given a value, even if grepping for CACHE didn't reveal it.

I don't know Inline::Files myself, but one minute browsing of the module and I found:

my (%symbols, $source); foreach my $vfile (vf_load($file, $SOVFM_pat)) { my $symbol = vf_marker($vfile); $symbol =~ s/^__|__\n//g; push @{$symbols{$symbol}}, $vfile; } foreach my $symbol (keys %symbols) { no strict 'refs'; my $fq_symbol = "${package}::${symbol}"; @$fq_symbol = @{$symbols{$symbol}}; $$fq_symbol = $symbols{$symbol}[0]; my $impl = tie *$fq_symbol, $class, $fq_symbol, -w $file; tie %$fq_symbol, $class."::Data", $impl; }
I think I can guess what that does.

Abigail

Replies are listed 'Best First'.
Re: Re: Inline::Files bug?
by BrowserUk (Patriarch) on Aug 01, 2002 at 13:02 UTC

    Ok, I admit it. No matter how much I look at that code, even my guesses at its function read like mental line-noise. :)

    Then again, I've spent several days (trying) to work out how some (most) of your regex code works (this has been a permenant resident in my editor for two weeks now>). I guess I'm gonna need rather more than my current 8-weeks association with Perl to achieve that level of understanding.

    I'm afraid my feelings re: this implicit use of the name of a filehandle to give a value to an autoloaded, global variable of the same name, is that it is at best, unintuative, and at worst, wholey redundant.

    Maybe if I had experienced Perl 4 (or earlier) where this sort of thing was the norm, it would be less so. For now, I can only rely on the good ministrations of the more experienced, as yourself, to set me straight when I err.

    Thanks again.

      Of course it's redundant. Many things in Perl are redundant, but that's why we all love Perl.

      If you don't like redundant things, pack your things and go to http://www.python.org. ;-)

      Abigail