Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup shebang lines of all maint/example scripts, remove from tests…

… entirely
  • Loading branch information...
commit f54428abf9cc7d7e5604745335694eaf558f6820 1 parent 494b556
@ribasushi ribasushi authored
Showing with 79 additions and 103 deletions.
  1. +2 −0  Changes
  2. +4 −2 examples/Schema/insertdb.pl
  3. +4 −2 examples/Schema/testdb.pl
  4. +1 −1  maint/benchmark_datafetch.pl
  5. +1 −1  maint/benchmark_hashrefinflator.pl
  6. +1 −1  maint/gen-pod-index.pl
  7. +1 −1  maint/gen-schema.pl
  8. +1 −1  maint/joint_deps.pl
  9. +1 −1  script/dbicadmin
  10. +0 −2  t/05components.t
  11. +0 −2  t/102load_classes.t
  12. +0 −2  t/30dbicplain.t
  13. +1 −1  t/34exception_action.t
  14. +0 −2  t/39load_namespaces_1.t
  15. +0 −2  t/39load_namespaces_2.t
  16. +0 −2  t/39load_namespaces_3.t
  17. +0 −2  t/39load_namespaces_4.t
  18. +0 −2  t/39load_namespaces_exception.t
  19. +0 −2  t/39load_namespaces_rt41083.t
  20. +0 −2  t/40resultsetmanager.t
  21. +36 −27 t/54taint.t
  22. +0 −2  t/94versioning.t
  23. +1 −2  t/cdbi/04-lazy.t
  24. +2 −4 t/count/in_subquery.t
  25. +4 −6 t/delete/m2m.t
  26. +7 −9 t/discard_changes_in_DESTROY.t
  27. +2 −3 t/resultset_class.t
  28. +5 −5 t/resultset_overload.t
  29. +0 −2  t/search/subquery.t
  30. +0 −2  t/storage/dbh_do.t
  31. +1 −1  t/storage/dbi_coderef.t
  32. +0 −1  t/storage/dbi_env.t
  33. +1 −1  t/storage/debug.t
  34. +1 −1  t/storage/disable_sth_caching.t
  35. +0 −2  t/storage/exception.t
  36. +1 −1  t/storage/ping_count.t
  37. +1 −1  t/storage/reconnect.t
  38. +0 −2  t/storage/stats.t
View
2  Changes
@@ -8,6 +8,8 @@ Revision history for DBIx::Class
definitions
- Implemented add_unique_constraints() which delegates to
add_unique_constraint() as appropriate
+ - dbicadmin now uses a /usr/bin/env shebang to work better with
+ perlbrew and other local perl builds
* Misc
- Makefile.PL no longer imports GetOptions() to interoperate better
View
6 examples/Schema/insertdb.pl
@@ -1,7 +1,9 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
-use MyDatabase::Main;
use strict;
+use warnings;
+
+use MyDatabase::Main;
my $schema = MyDatabase::Main->connect('dbi:SQLite:db/example.db');
View
6 examples/Schema/testdb.pl
@@ -1,8 +1,10 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
-use MyDatabase::Main;
+use warnings;
use strict;
+use MyDatabase::Main;
+
my $schema = MyDatabase::Main->connect('dbi:SQLite:db/example.db');
# for other DSNs, e.g. MySql, see the perldoc for the relevant dbd
# driver, e.g perldoc L<DBD::mysql>.
View
2  maint/benchmark_datafetch.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
use warnings;
View
2  maint/benchmark_hashrefinflator.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# So you wrote a new mk_hash implementation which passed all tests (particularly
View
2  maint/gen-pod-index.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Originally by: Zbigniew Lukasiak, C<zz bb yy@gmail.com>
# but refactored and modified to our nefarious purposes
View
2  maint/gen-schema.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
use warnings;
View
2  maint/joint_deps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use warnings;
use strict;
View
2  script/dbicadmin
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
use warnings;
View
2  t/05components.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/102load_classes.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/30dbicplain.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/34exception_action.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
View
2  t/39load_namespaces_1.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/39load_namespaces_2.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/39load_namespaces_3.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/39load_namespaces_4.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/39load_namespaces_exception.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
2  t/39load_namespaces_rt41083.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
View
2  t/40resultsetmanager.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
63 t/54taint.t
@@ -1,45 +1,54 @@
-#!perl -T
+#!/usr/bin/env perl -T
# the above line forces Test::Harness into taint-mode
+# DO NOT REMOVE
use strict;
use warnings;
use Test::More;
-BEGIN { plan tests => 7 }
+use Test::Exception;
+use lib qw(t/lib);
-package DBICTest::Taint::Classes;
+throws_ok (
+ sub { $ENV{PATH} . (kill (0)) },
+ qr/Insecure dependency in kill/,
+ 'taint mode active'
+);
-use Test::More;
-use Test::Exception;
+{
+ package DBICTest::Taint::Classes;
-use lib qw(t/lib);
-use base qw/DBIx::Class::Schema/;
+ use Test::More;
+ use Test::Exception;
-lives_ok (sub {
- __PACKAGE__->load_classes(qw/Manual/);
- ok( __PACKAGE__->source('Manual'), 'The Classes::Manual source has been registered' );
- __PACKAGE__->_unregister_source (qw/Manual/);
-}, 'Loading classes with explicit load_classes worked in taint mode' );
+ use base qw/DBIx::Class::Schema/;
-lives_ok (sub {
- __PACKAGE__->load_classes();
- ok( __PACKAGE__->source('Auto'), 'The Classes::Auto source has been registered' );
- ok( __PACKAGE__->source('Auto'), 'The Classes::Manual source has been re-registered' );
-}, 'Loading classes with Module::Find/load_classes worked in taint mode' );
+ lives_ok (sub {
+ __PACKAGE__->load_classes(qw/Manual/);
+ ok( __PACKAGE__->source('Manual'), 'The Classes::Manual source has been registered' );
+ __PACKAGE__->_unregister_source (qw/Manual/);
+ }, 'Loading classes with explicit load_classes worked in taint mode' );
+ lives_ok (sub {
+ __PACKAGE__->load_classes();
+ ok( __PACKAGE__->source('Auto'), 'The Classes::Auto source has been registered' );
+ ok( __PACKAGE__->source('Auto'), 'The Classes::Manual source has been re-registered' );
+ }, 'Loading classes with Module::Find/load_classes worked in taint mode' );
+}
-package DBICTest::Taint::Namespaces;
+{
+ package DBICTest::Taint::Namespaces;
-use Test::More;
-use Test::Exception;
+ use Test::More;
+ use Test::Exception;
-use lib qw(t/lib);
-use base qw/DBIx::Class::Schema/;
+ use base qw/DBIx::Class::Schema/;
-lives_ok (sub {
- __PACKAGE__->load_namespaces();
- ok( __PACKAGE__->source('Test'), 'The Namespaces::Test source has been registered' );
-}, 'Loading classes with Module::Find/load_namespaces worked in taint mode' );
+ lives_ok (sub {
+ __PACKAGE__->load_namespaces();
+ ok( __PACKAGE__->source('Test'), 'The Namespaces::Test source has been registered' );
+ }, 'Loading classes with Module::Find/load_namespaces worked in taint mode' );
+}
-1;
+done_testing;
View
2  t/94versioning.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
View
3  t/cdbi/04-lazy.t
@@ -1,6 +1,5 @@
-#!/usr/bin/perl -w
-
use strict;
+use warnings;
use Test::More;
use Test::Warn;
View
6 t/count/in_subquery.t
@@ -1,12 +1,8 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
-plan ( tests => 1 );
-
use lib qw(t/lib);
use DBICTest;
use DBIC::SqlMakerTest;
@@ -22,3 +18,5 @@ my $schema = DBICTest->init_schema();
my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $squery } } );
is($subsel_rs->count, $rs->count, 'Subselect on PK got the same row count');
}
+
+done_testing;
View
10 t/delete/m2m.t
@@ -1,7 +1,5 @@
-#!/usr/bin/perl -w
-
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
@@ -9,8 +7,6 @@ use DBICTest;
my $schema = DBICTest->init_schema();
-plan tests => 5;
-
my $cd = $schema->resultset("CD")->find(2);
ok $cd->liner_notes;
ok keys %{$cd->{_relationship_data}}, "_relationship_data populated";
@@ -20,4 +16,6 @@ ok $cd->liner_notes, 'relationships still valid after discarding changes';
ok $cd->liner_notes->delete;
$cd->discard_changes;
-ok !$cd->liner_notes, 'discard_changes resets relationship';
+ok !$cd->liner_notes, 'discard_changes resets relationship';
+
+done_testing;
View
16 t/discard_changes_in_DESTROY.t
@@ -1,7 +1,5 @@
-#!/usr/bin/perl -w
-
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
@@ -9,8 +7,6 @@ use DBICTest;
my $schema = DBICTest->init_schema();
-plan tests => 1;
-
{
my @warnings;
local $SIG{__WARN__} = sub { push @warnings, @_; };
@@ -18,15 +14,17 @@ plan tests => 1;
# Test that this doesn't cause infinite recursion.
local *DBICTest::Artist::DESTROY;
local *DBICTest::Artist::DESTROY = sub { $_[0]->discard_changes };
-
+
my $artist = $schema->resultset("Artist")->create( {
artistid => 10,
name => "artist number 10",
});
-
+
$artist->name("Wibble");
-
+
print "# About to call DESTROY\n";
}
is_deeply \@warnings, [];
-}
+}
+
+done_testing;
View
5 t/resultset_class.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
@@ -7,7 +5,6 @@ use Class::Inspector ();
unshift(@INC, './t/lib');
use lib 't/lib';
-plan tests => 5;
use DBICTest;
@@ -20,3 +17,5 @@ is(DBICTest::Schema->source('Artist')->resultset_class, 'DBICNSTest::ResultSet::
my $schema = DBICTest->init_schema;
my $resultset = $schema->resultset('Artist')->search;
isa_ok($resultset, 'DBICNSTest::ResultSet::A', 'resultset is custom class');
+
+done_testing;
View
10 t/resultset_overload.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
@@ -7,8 +7,6 @@ use DBICTest;
my $schema = DBICTest->init_schema();
-plan tests => 6;
-
{
my $rs = $schema->resultset("CD")->search({});
@@ -19,8 +17,10 @@ plan tests => 6;
{
my $rs = $schema->resultset("CD")->search({ title => "Does not exist" });
-
+
ok !$rs->count;
is $rs, $rs->count, "resultset as number without results";
ok $rs, "resultset as boolean always true";
-}
+}
+
+done_testing;
View
2  t/search/subquery.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
View
2  t/storage/dbh_do.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
View
2  t/storage/dbi_coderef.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
View
1  t/storage/dbi_env.t
@@ -1,4 +1,3 @@
-#!/usr/bin/perl
use strict;
use warnings;
use lib qw(t/lib);
View
2  t/storage/debug.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
View
2  t/storage/disable_sth_caching.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
View
2  t/storage/exception.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
View
2  t/storage/ping_count.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
View
2  t/storage/reconnect.t
@@ -1,5 +1,5 @@
use strict;
-use warnings;
+use warnings;
use FindBin;
use File::Copy;
View
2  t/storage/stats.t
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More;
Please sign in to comment.
Something went wrong with that request. Please try again.