Hi all (again),

I've been thinking about the way par includes files via the -M switch and how it means 
that filters must be applied to the code in some cases to make those files found (like 
the recent filter over Tk::findINC to properly find -M'd image files).

Wouldn't it be simpler if pp included the file in the par file with its correct path 
relative to @INC?

For instance, if I wanted to include the file Tk/folder.xpm using the switch:

        -M Tk/folder.xpm

(assuming -M actually looks though @INC for the right file - I've had some trouble 
here :)

then instead of pp putting folder.xpm in the 'root directory' of the par file, it 
instead added it as Tk/folder.xpm (or lib/Tk/folder.xpm).

I'm assuming here (I haven't looked through the code yet) that the coderef in the 
compiled version of @INC refers lookups to the contents of the par file, which would 
mean anything looking through @INC for Tk/folder.xpm (as Tk::findINC would do given 
the argument 'folder.xpm') would quite easily find the right file.

Of course there'd still need to be filters for any function that can't handle coderefs 
in @INC, but it would make finding the included files once that's done _much_ simpler.

Does this make sense?

MB

Reply via email to