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