Steve,
1. Yes, the three dots was intentional. The documentation for the perltidy
-profile option (
https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy) states:
"A pathname begins with three dots, e.g. ".../.perltidyrc", indicates that
the file should be searched for starting in the current directory and
working upwards. This makes it easier to have multiple projects each with
their own .perltidyrc in their root directories."
(See also the second entry in Perl::Tidy's CHANGES file dated "2010 12 17")
Because the PERLTIDY environment variable is another way to specify the
profile file to use, I expected it to understand the same notation. The
example commands were meant to show that it does not behave the same way.
Basically, by setting PERLTIDY to ".../.perltidyrc" I would expect it to
find the .perltidyrc file in the root of my project even when I am in a sub
(or sub sub... etc) directory.
2. When using shell syntax this line:
PERLTIDY=.../.perltidyrc perltidy -dpro
Does not mean: set PERLTIDY to the value '.../.perltidyrc perltidy -dpro'
It means: set PERLTIDY to the value '.../.perltidyrc' and then run the
command 'perltidy -dpro'
Essentially it is the same as saying:
export PERLTIDY=.../.perltidyrc
perltidy -dpro
But allows you to do it on a single line.
John
On Sat, Jun 3, 2017 at 8:25 PM, Steven Hancock via RT <
bug-Perl-Tidy@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=121959 >
>
> John,
> 1: Do you really want three dots before the slash instead of two?
> 2: The PERLTIDY envirnoment variable indicates the perltidyrc file or
> directory, not the entire command. So even with two dots, your
> example would not work.
> Steve
>
> On 6/1/17, John Wittkoski via RT <bug-Perl-Tidy@rt.cpan.org> wrote:
> > Thu Jun 01 23:17:50 2017: Request 121959 was acted upon.
> > Transaction: Ticket created by jwittkoski@gmail.com
> > Queue: Perl-Tidy
> > Subject: PERLTIDY doesn't seem to honor .../
> > Broken in: (no value)
> > Severity: (no value)
> > Owner: Nobody
> > Requestors: jwittkoski@gmail.com
> > Status: new
> > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=121959 >
> >
> >
> > With a directory layout like:
> >
> > project
> > project/.perltidyrc
> > project/lib
> >
> > When working in the project/lib directory, this finds the
> > project/.perltidyrc:
> >
> > perltidy --pro=.../.perltidyrc -dpro
> >
> > But this doesn't:
> >
> > PERLTIDY=.../.perltidyrc perltidy -dpro
> > Shouldn't the .../ notation be honored when seen in the environment
> > variable?
> >
> >
>
>