From: Aaron P. <aar...@sp...> - 2003-08-10 20:33:34
|
On Sunday, August 10, 2003, at 12:20 PM, Maurice Aubrey wrote: > Hi Aaron. > > Aaron Patterson wrote: >> Hey everyone. Have any of you looked at a perl module called PAR? > > What do you think of this? > > We modify TF to allow URLs in the @FINC search path. That way, we > could specify a PAR like so: > > par:file:/path/to/my/archive.par!templates/ > > That seems consistent with the JAR URL syntax. With this example, any > includes with relative paths would be checked for under templates/ in > the PAR. I like it. I think that adding to the FINC would be the best way to implement searching in PAR files. How would TF read from the PAR file though? The PAR file is just a zip file, and I'm sure there are perl modules for accessing files in a zip. How does Apache::PAR do it? I haven't read through the Apache::PAR code yet. > > Alternatively, you could always specify the absolute path directly > like this: > > $forge->include('par:file/path/to/my/archive.par!/templates/foo.tf'); > > Then, to allow this to be used with Apache::PAR, you'd add a ForgeINC > to the web.conf file: > > ForgeINC ##PARFILE##/ I think this would work pretty well. I would just want the user to have to do as little configuration as possible. I imagine that when the PAR files is configured with Apache::PAR, that Apache::PAR is going to point to the same PAR file as ForgeINC will. I wonder if TF could read the configuration values from Apache::PAR.... Although, that may make them too coupled.... > > Thoughts? > > Maurice > > --Aaron |