Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Run CPAN distribution.

Report information
The Basics
Id: 105240
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Run

People
Owner: Nobody in particular
Requestors: VDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.039



Subject: Execution order
in dist.ini: [Run::BeforeBuild] run = echo "line 1. BEGIN" run_if_release = echo "line 2. RELEASE" run_no_release = echo "line 3. NOT release" run_if_trial = echo "line 4. TRIAL" run_no_trial = echo "line 5. NOT TRIAL" run = echo "line 6. END" $ dzil build [Run::BeforeBuild] executing: echo "line 1. BEGIN" [Run::BeforeBuild] line 1. BEGIN [Run::BeforeBuild] executing: echo "line 6. END" [Run::BeforeBuild] line 6. END [Run::BeforeBuild] executing: echo "line 5. NOT TRIAL" [Run::BeforeBuild] line 5. NOT TRIAL [Run::BeforeBuild] executing: echo "line 3. NOT release" [Run::BeforeBuild] line 3. NOT release You see that lines are executed not in linear order. It would be nice to execute lines in order of appearance, or, at least, document execution order.
The base idea I had behind Dzil Run was to allow to install hooks, so that you can make more complex evaluation behind, it was never really meant to be a "stack of scripts". I do see the point here, so its a valid feature request, you are welcome for making a pull request (or in other words: well voluntereed ;) )
On 2015-06-15 08:30:29, VDB wrote: Show quoted text
> in dist.ini: > > [Run::BeforeBuild] > run = echo "line 1. BEGIN" > run_if_release = echo "line 2. RELEASE" > run_no_release = echo "line 3. NOT release" > run_if_trial = echo "line 4. TRIAL" > run_no_trial = echo "line 5. NOT TRIAL" > run = echo "line 6. END" > > You see that lines are executed not in linear order. > > It would be nice to execute lines in order of appearance, or, at > least, document execution order.
There is no way to determine the order of appearance in the configuration file -- options are stored into a perl hash, which has no order. However, if you look in the code, the options are always processed the same way, but this ordering has no particular meaning. However, order is respected for multiple commands using the same configuration type (e.g. multiple 'run' lines are executed in order).
On Mon Jun 15 12:38:37 2015, ETHER wrote: Show quoted text
> There is no way to determine the order of appearance in the > configuration file -- options are stored into a perl hash, which has > no order. However, if you look in the code, the options are always > processed the same way, but this ordering has no particular meaning.
This is why I wrote: "or, at least, DOCUMENT execution order".
On 2015-06-15 10:28:34, VDB wrote: Show quoted text
> On Mon Jun 15 12:38:37 2015, ETHER wrote:
> > There is no way to determine the order of appearance in the > > configuration file -- options are stored into a perl hash, which has > > no order. However, if you look in the code, the options are always > > processed the same way, but this ordering has no particular meaning.
> > This is why I wrote: "or, at least, DOCUMENT execution order". >
The execution order has been documented.