[t/spec] Remove unneeded .perl method, moritz++.
[pugs.git] / util / smartlinks.pl
blobbf146f37eccfcc4ab6056190ee6d9ecdf4d67727
1 #!/usr/bin/env perl
3 # util/smartlinks.pl - The successor to util/catalog_tests.pl.
5 # Most of the contet of this program is now in the Text::SmartLinks
6 # module in the Text-SmartLinks/ subdiectory.
7 # This script is here to provide the necessary flags and defaults required
8 # in the Pugs SVN.
10 use strict;
11 use warnings;
12 use FindBin;
14 my $version = get_pugs_rev();
15 # The directory where the Synopses live.
16 # Please don't set syn-dir to elsewhere unless you have a good reason.
17 $ENV{PUGS_SMARTLINKS} = 1;
18 system qq($^X -I $FindBin::Bin/Text-SmartLinks/lib $FindBin::Bin/Text-SmartLinks/script/smartlinks.pl @ARGV --version $version);
20 sub get_pugs_rev {
21 my $stdout = `$^X $FindBin::Bin/version_h.pl`;
22 my ($pugs_rev) = ($stdout =~ /^(\d+)/);
23 if (!$pugs_rev) {
24 die "Can't determine version of the pugs repository via 'svn info'";
25 # # if we don't have access to others' svk info
26 # # (which is the case on feather where i'm using
27 # # Audrey's pugs working copy), then parse pugs_version.h
28 # # directly:
29 # if (open my $in, "$FindBin::Bin/../src/Pugs/pugs_version.h") {
30 # warn "reading pugs_version.h...\n";
31 # local $/;
32 # my $str = <$in>;
33 # ($pugs_rev) = ($str =~ /PUGS_SVN_REVISION\s+(\d+)/);
34 # }
36 return $pugs_rev;