Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Breaking before ORDER and GROUP BY.

  • Loading branch information...
commit 677db358e483fbb9d5d7f4c298a4293d0a8a0727 1 parent 91187a1
Jonas Kramer authored
View
24 Build.PL
@@ -1,14 +1,18 @@
-
+use strict;
+use warnings;
use Module::Build;
-my $build = new Module::Build(
- module_name => 'SQL::Beautify',
- license => 'artistic_2',
- requires => {
- 'perl' => '5.8.5',
- 'Carp' => '0',
- 'SQL::Tokenizer' => '0.18',
- },
+my $builder = Module::Build->new(
+ module_name => 'SQL::Beautify',
+ license => 'artistic_2',
+ dist_author => 'Jonas Kramer <jkramer@cpan.org>',
+ dist_version_from => 'lib/SQL/Beautify.pm',
+ build_requires => {
+ 'Test::More' => 0,
+ 'SQL::Tokenizer' => 0,
+ },
+ add_to_cleanup => [ 'SQL-Beautify-*' ],
+ create_makefile_pl => 'traditional',
);
-$build->create_build_script;
+$builder->create_build_script();
View
9 Changes
@@ -0,0 +1,9 @@
+Revision history for SQL-Beautify
+
+0.02 2009-03-29
+ * Fix in documentation.
+ * Line break before ORDER BY and GROUP BY.
+
+
+0.01 2009-02-22
+ First version, released on an unsuspecting world.
View
10 MANIFEST
@@ -0,0 +1,10 @@
+Build.PL
+Changes
+MANIFEST
+README
+lib/SQL/Beautify.pm
+t/pod-coverage.t
+t/pod.t
+t/plain_text.t
+t/html.t
+t/color.t
View
52 README
@@ -0,0 +1,52 @@
+SQL-Beautify
+
+The README is used to introduce the module and provide instructions on
+how to install the module, any machine dependencies it may have (for
+example C compilers and installed libraries) and any other information
+that should be provided before the module is installed.
+
+A README file is required for CPAN modules since CPAN extracts the README
+file from a module distribution so that people browsing the archive
+can use it to get an idea of the module's uses. It is usually a good idea
+to provide version information here so that people can decide whether
+fixes for the module are worth downloading.
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
+
+SUPPORT AND DOCUMENTATION
+
+After installing, you can find documentation for this module with the
+perldoc command.
+
+ perldoc SQL::Beautify
+
+You can also look for information at:
+
+ RT, CPAN's request tracker
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=SQL-Beautify
+
+ AnnoCPAN, Annotated CPAN documentation
+ http://annocpan.org/dist/SQL-Beautify
+
+ CPAN Ratings
+ http://cpanratings.perl.org/d/SQL-Beautify
+
+ Search CPAN
+ http://search.cpan.org/dist/SQL-Beautify/
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2009 Jonas Kramer
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
View
5 lib/SQL/Beautify.pm
@@ -4,7 +4,7 @@ package SQL::Beautify;
use strict;
use warnings;
-our $VERSION = 0.01;
+our $VERSION = 0.02;
use SQL::Tokenizer;
use Carp;
@@ -95,8 +95,9 @@ sub beautify {
$self->_over;
}
- elsif($token =~ /^(?:GROUP)$/i) {
+ elsif($token =~ /^(?:GROUP|ORDER)$/i) {
$self->_back;
+ $self->_new_line;
$self->_add_token($token);
}
View
0  t/02_color.t → t/color.t
File renamed without changes
View
0  t/01_html.t → t/html.t
File renamed without changes
View
0  t/00_plain_text.t → t/plain_text.t
File renamed without changes
View
18 t/pod-coverage.t
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod::Coverage
+my $min_tpc = 1.08;
+eval "use Test::Pod::Coverage $min_tpc";
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
+ if $@;
+
+# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
+# but older versions don't recognize some common documentation styles
+my $min_pc = 0.18;
+eval "use Pod::Coverage $min_pc";
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok();
View
12 t/pod.t
@@ -0,0 +1,12 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();
Please sign in to comment.
Something went wrong with that request. Please try again.