Hello, well, Darren Chamberlain answered that question some time ago, i'm just quoting:
> > Say I've got a bunch of templates siting in my src directory and I run > > ttree, how does ttree sort which files are processed first? By name? > > Thanks. > If you specify filenames on the command line, it process them in the > order you give them. Otherwise, it processes them in directory order, > descending directories as it finds them. (I'm looking at the source for > ttree in CVS (version 2,78); the logic for file ordering starts at line > 200.) > (darren) So you can't be sure about the sequence unless you specify files on commandline, but anyway i think ist a bad idea to share global vars between files, why not use small include-file per directory where you are setting that var (or something which helps you to decide whether you use the var or not)? On the other hand you should be able to do something like ttree [OPTS] `find /src -type | sort` unless there are too many files in the tree... Matthias On Thu, 02 Dec 2004 15:55:40 +0000 Andrew Glen-Young <[EMAIL PROTECTED]> wrote: > Hello. > > I'm new to using TT, but not new to Perl (so please bear with me). > > The thing that is baffling me is the order in which ttree decides to > process files and directories. I assumed directory listing order, but > this does not seem to hold true. > > My directory structure looks like this: > /src/a > /b > /c > > When I run ttree it seems to process the directories like so: > + a > + c > + b > > This order will remain consistent after each run until I move the > directories around and then it seems to pick a new order. > The order of processing is really important to me as I am setting a > global variable in directory 'a' which needs to be used in directory 'b' > but not directory 'c'. > > Thanks. > - Andrew > > > _______________________________________________ > templates mailing list > [EMAIL PROTECTED] > http://lists.template-toolkit.org/mailman/listinfo/templates > _______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
