Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a $VERSION string to each module file
- Loading branch information
Showing
10 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use strict; | ||
use warnings; | ||
|
||
# Propogates the version string in lib/PDL/Graphics/Prima.pm to the version | ||
# strings in the other modules. | ||
|
||
open my $in_fh, '<', 'lib/PDL/Graphics/Prima.pm'; | ||
# Find the version string | ||
while(<$in_fh>) { | ||
last if /^our \$VERSION = (\d\.\d\d.{4})/; | ||
} | ||
my $version = $1; | ||
close $in_fh; | ||
|
||
# OK, now run through all the module files | ||
for my $module_filename (glob 'lib/PDL/Graphics/Prima/*.pm') { | ||
next if $module_filename =~ /Internals/; | ||
print "Updating $module_filename\n"; | ||
open my $out_fh, '+<', $module_filename; | ||
while (my $line = <$out_fh>) { | ||
if ($line =~ /\$VERSION = /) { | ||
print $out_fh "our \$VERSION = $1\n"; | ||
last; | ||
} | ||
} | ||
close $out_fh; | ||
} |