/usr/share/doc/perltidy/examples/bbtidy.pl is in perltidy 20140328-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/usr/bin/perl -wn
# This program was posted on the MacPerl mailing list by
# Charles Albrecht as one way to get perltidy to work as a filter
# under BBEdit.
use Perl::Tidy;
BEGIN { my $input_string = ""; my $output_string = ""; }
$input_string .= $_;
END {
my $err=Perl::Tidy::perltidy(
source => \$input_string,
destination => \$output_string
);
if ($err){
die "Error calling perltidy\n";
}
print "$output_string\n";
}
__END__
|