b4976b
#!/usr/bin/perl
b4976b
b4976b
use lib $lib;
b4976b
b4976b
# Extract module name from perl(Module::Name) = blah
b4976b
if (/^perl\((.*)\).*$/) {
b4976b
	my $module = $1;
b4976b
b4976b
	# Require the module so we can get at its version number
b4976b
	eval "require $module";
b4976b
b4976b
	# Grok the module's version
b4976b
	my $modver = eval "\$${module}::VERSION";
b4976b
b4976b
	# Rewrite the output with the right version number
b4976b
	print "perl($module) = $modver\n";
b4976b
} else {
b4976b
	# Not a perl module reference, pass through unchanged
b4976b
	print;
b4976b
}