Skip to content

Add plugins for package block and package version#10

Open
zmughal wants to merge 1 commit intoshadow-dot-cat:masterfrom
zmughal:package-syntax
Open

Add plugins for package block and package version#10
zmughal wants to merge 1 commit intoshadow-dot-cat:masterfrom
zmughal:package-syntax

Conversation

@zmughal
Copy link

@zmughal zmughal commented Apr 17, 2022

Fixes #9.


Seems that the only difference between running both in a different order is a
small amount of white-space:

$ perl -I lib -MBabble::Filter=::PackageBlock,::PackageVersion -0777 -pe  babble <(echo 'package Foo::Bar v1.2.3 { 42 }')
{ package Foo::Bar;
our $VERSION = 'v1.2.3';
 42 }
$ perl -I lib -MBabble::Filter=::PackageVersion,::PackageBlock -0777 -pe  babble <(echo 'package Foo::Bar v1.2.3 { 42 }')
{ package Foo::Bar;
our $VERSION = 'v1.2.3';
42 }

I'm debating whether to use a flag to place $VERSION on its own line or not.
And I can also see a flag for using version objects or not.

zmughal referenced this pull request in zmughal/Babble Sep 4, 2022
Add plugins for package block and package version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package syntax: versions and blocks

1 participant