]> git.donarmstrong.com Git - perltidy.git/blob - examples/bbtidy.pl
[svn-inject] Installing original source of perltidy
[perltidy.git] / examples / bbtidy.pl
1 #!/usr/bin/perl -wn
2
3 # This program was posted on the MacPerl mailing list by 
4 # Charles Albrecht as one way to get perltidy to work as a filter
5 # under BBEdit.
6
7 use Perl::Tidy;
8
9 BEGIN { my $input_string = ""; my $output_string = ""; }
10
11 $input_string .= $_;
12
13 END {
14     Perl::Tidy::perltidy(
15         source      => \$input_string,
16         destination => \$output_string
17     );
18
19     print "$output_string\n";
20 }
21
22 __END__
23