commit perl-Mojolicious for openSUSE:Factory
Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2019-09-30 16:03:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Mojolicious" Mon Sep 30 16:03:32 2019 rev:116 rq:734054 version:8.25 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2019-09-16 10:52:43.239154216 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new.2352/perl-Mojolicious.changes 2019-09-30 16:03:43.172526727 +0200 @@ -1,0 +2,9 @@ +Mon Sep 30 10:44:01 UTC 2019 - <timueller+perl@suse.de> + +- updated to 8.25 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 8.25 2019-09-29 + - Added curfile function to Mojo::File. (Grinnz) + +------------------------------------------------------------------- Old: ---- Mojolicious-8.24.tar.gz New: ---- Mojolicious-8.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.YQ0pN3/_old 2019-09-30 16:03:44.396523470 +0200 +++ /var/tmp/diff_new_pack.YQ0pN3/_new 2019-09-30 16:03:44.400523459 +0200 @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 8.24 +Version: 8.25 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework ++++++ Mojolicious-8.24.tar.gz -> Mojolicious-8.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/Changes new/Mojolicious-8.25/Changes --- old/Mojolicious-8.24/Changes 2019-09-11 22:25:59.000000000 +0200 +++ new/Mojolicious-8.25/Changes 2019-09-29 15:13:48.000000000 +0200 @@ -1,4 +1,7 @@ +8.25 2019-09-29 + - Added curfile function to Mojo::File. (Grinnz) + 8.24 2019-09-11 - Added EXPERIMENTAL context method to Mojo::Log. - Added EXPERIMENTAL cleanup event to Mojo::IOLoop::Subprocess. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/META.json new/Mojolicious-8.25/META.json --- old/Mojolicious-8.24/META.json 2019-09-12 00:32:28.000000000 +0200 +++ new/Mojolicious-8.25/META.json 2019-09-29 15:15:20.000000000 +0200 @@ -4,7 +4,7 @@ "Sebastian Riedel <sri@cpan.org>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.36, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], @@ -62,6 +62,6 @@ }, "x_IRC" : "irc://irc.freenode.net/#mojo" }, - "version" : "8.24", + "version" : "8.25", "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/META.yml new/Mojolicious-8.25/META.yml --- old/Mojolicious-8.24/META.yml 2019-09-12 00:32:28.000000000 +0200 +++ new/Mojolicious-8.25/META.yml 2019-09-29 15:15:20.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.36, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -34,5 +34,5 @@ homepage: https://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/mojolicious/mojo.git -version: '8.24' +version: '8.25' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojo/File.pm new/Mojolicious-8.25/lib/Mojo/File.pm --- old/Mojolicious-8.24/lib/Mojo/File.pm 2019-07-31 17:58:31.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojo/File.pm 2019-09-25 21:36:04.000000000 +0200 @@ -20,7 +20,7 @@ use IO::File (); use Mojo::Collection; -our @EXPORT_OK = ('path', 'tempdir', 'tempfile'); +our @EXPORT_OK = ('curfile', 'path', 'tempdir', 'tempfile'); sub basename { File::Basename::basename ${shift()}, @_ } @@ -38,6 +38,8 @@ return $self->new(-d $to ? ($to, File::Basename::basename $self) : $to); } +sub curfile { __PACKAGE__->new(Cwd::realpath((caller)[1])) } + sub dirname { $_[0]->new(scalar File::Basename::dirname ${$_[0]}) } sub is_abs { file_name_is_absolute ${shift()} } @@ -209,6 +211,13 @@ L<Mojo::File> implements the following functions, which can be imported individually. +=head2 curfile + + my $path = curfile; + +Construct a new scalar-based L<Mojo::File> object for the absolute path to the +current source file. + =head2 path my $path = path; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojo/IOLoop/TLS.pm new/Mojolicious-8.25/lib/Mojo/IOLoop/TLS.pm --- old/Mojolicious-8.24/lib/Mojo/IOLoop/TLS.pm 2019-06-28 23:17:52.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojo/IOLoop/TLS.pm 2019-09-25 21:21:29.000000000 +0200 @@ -1,7 +1,7 @@ package Mojo::IOLoop::TLS; use Mojo::Base 'Mojo::EventEmitter'; -use Mojo::File 'path'; +use Mojo::File 'curfile'; use Mojo::IOLoop; use Scalar::Util 'weaken'; @@ -17,8 +17,8 @@ # To regenerate the certificate run this command (28.06.2019) # openssl req -x509 -newkey rsa:4096 -nodes -sha256 -out server.crt \ # -keyout server.key -days 7300 -subj '/CN=localhost' -my $CERT = path(__FILE__)->sibling('resources', 'server.crt')->to_string; -my $KEY = path(__FILE__)->sibling('resources', 'server.key')->to_string; +my $CERT = curfile->sibling('resources', 'server.crt')->to_string; +my $KEY = curfile->sibling('resources', 'server.key')->to_string; sub DESTROY { shift->_cleanup } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojo/UserAgent.pm new/Mojolicious-8.25/lib/Mojo/UserAgent.pm --- old/Mojolicious-8.24/lib/Mojo/UserAgent.pm 2019-06-26 00:25:06.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojo/UserAgent.pm 2019-09-24 08:57:04.000000000 +0200 @@ -385,7 +385,8 @@ my $tx = $ua->put('[::1]:3000' => {'Content-Type' => 'text/plain'} => 'Hi!'); # Quick JSON API request with Basic authentication - my $value = $ua->get('https://sri:t3st@example.com/test.json')->result->json; + my $url = Mojo::URL->new('https://example.com/test.json')->userinfo('sri:☃'); + my $value = $ua->get($url)->result->json; # JSON POST (application/json) with TLS certificate authentication my $tx = $ua->cert('tls.crt')->key('tls.key') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Command/Author/generate/app.pm new/Mojolicious-8.25/lib/Mojolicious/Command/Author/generate/app.pm --- old/Mojolicious-8.24/lib/Mojolicious/Command/Author/generate/app.pm 2019-06-29 21:18:51.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious/Command/Author/generate/app.pm 2019-09-25 21:21:29.000000000 +0200 @@ -113,8 +113,8 @@ use strict; use warnings; -use FindBin; -BEGIN { unshift @INC, "$FindBin::Bin/../lib" } +use Mojo::File 'curfile'; +use lib curfile->dirname->sibling('lib')->to_string; use Mojolicious::Commands; # Start command line interface for application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Guides/Contributing.pod new/Mojolicious-8.25/lib/Mojolicious/Guides/Contributing.pod --- old/Mojolicious-8.24/lib/Mojolicious/Guides/Contributing.pod 2019-08-19 16:20:18.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious/Guides/Contributing.pod 2019-09-24 09:00:24.000000000 +0200 @@ -207,8 +207,8 @@ 2/3 majority vote. Votes should be public if possible, so non-members can participate as well. -Non-members that regularly have a positive impact on decisions should be -considered for core team membership. +Non-members that regularly have a positive impact on decisions and participate +in IRC discussions should be considered for core team membership. The pumpkin-holder has veto rights on all decisions and may select their successor. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Guides/Cookbook.pod new/Mojolicious-8.25/lib/Mojolicious/Guides/Cookbook.pod --- old/Mojolicious-8.24/lib/Mojolicious/Guides/Cookbook.pod 2019-05-29 13:51:24.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious/Guides/Cookbook.pod 2019-09-25 21:21:29.000000000 +0200 @@ -1753,7 +1753,7 @@ package MyApp; use Mojo::Base 'Mojolicious'; - use Mojo::File 'path'; + use Mojo::File 'curfile'; use Mojo::Home; # Every CPAN module needs a version @@ -1763,7 +1763,7 @@ my $self = shift; # Switch to installable home directory - $self->home(Mojo::Home->new(path(__FILE__)->sibling('MyApp'))); + $self->home(Mojo::Home->new(curfile->sibling('MyApp'))); # Switch to installable "public" directory $self->static->paths->[0] = $self->home->child('public'); @@ -1789,8 +1789,8 @@ use strict; use warnings; - use FindBin; - BEGIN { unshift @INC, "$FindBin::Bin/../lib" } + use Mojo::File 'curfile'; + use lib curfile->dirname->sibling('lib')->to_string; use Mojolicious::Commands; # Start command line interface for application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Guides/Growing.pod new/Mojolicious-8.25/lib/Mojolicious/Guides/Growing.pod --- old/Mojolicious-8.24/lib/Mojolicious/Guides/Growing.pod 2018-11-01 16:18:21.000000000 +0100 +++ new/Mojolicious-8.25/lib/Mojolicious/Guides/Growing.pod 2019-09-25 21:21:29.000000000 +0200 @@ -341,8 +341,8 @@ use Test::Mojo; # Include application - use FindBin; - require "$FindBin::Bin/../myapp.pl"; + use Mojo::File 'curfile'; + require curfile->dirname->sibling('myapp.pl'); # Allow 302 redirect responses my $t = Test::Mojo->new; @@ -747,16 +747,17 @@ $ mkdir script $ mv myapp.pl script/my_app -Just a few small details change, instead of L<lib> we now use L<FindBin> and -C<@INC>, allowing us to start the application from outside its home directory. +Just a few small details change, instead of a relative path to L<lib> we now +use L<Mojo::File> to get an absolute path, allowing us to start the application +from outside its home directory. #!/usr/bin/env perl use strict; use warnings; - use FindBin; - BEGIN { unshift @INC, "$FindBin::Bin/../lib" } + use Mojo::File 'curfile'; + use lib curfile->dirname->sibling('lib')->to_string; use Mojolicious::Commands; # Start command line interface for application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Guides/Rendering.pod new/Mojolicious-8.25/lib/Mojolicious/Guides/Rendering.pod --- old/Mojolicious-8.24/lib/Mojolicious/Guides/Rendering.pod 2018-12-01 14:35:43.000000000 +0100 +++ new/Mojolicious-8.25/lib/Mojolicious/Guides/Rendering.pod 2019-09-25 21:21:29.000000000 +0200 @@ -1170,13 +1170,13 @@ package Mojolicious::Plugin::AlertAssets; use Mojo::Base 'Mojolicious::Plugin'; - use Mojo::File 'path'; + use Mojo::File 'curfile'; sub register { my ($self, $app) = @_; # Append "templates" and "public" directories - my $base = path(__FILE__)->sibling('AlertAssets'); + my $base = curfile->sibling('AlertAssets'); push @{$app->renderer->paths}, $base->child('templates')->to_string; push @{$app->static->paths}, $base->child('public')->to_string; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Guides/Tutorial.pod new/Mojolicious-8.25/lib/Mojolicious/Guides/Tutorial.pod --- old/Mojolicious-8.24/lib/Mojolicious/Guides/Tutorial.pod 2019-09-12 00:31:23.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious/Guides/Tutorial.pod 2019-09-25 21:21:29.000000000 +0200 @@ -1003,11 +1003,11 @@ L<Test::Mojo>. use Test::More; - use Mojo::File 'path'; + use Mojo::File 'curfile'; use Test::Mojo; # Portably point to "../myapp.pl" - my $script = path(__FILE__)->dirname->sibling('myapp.pl'); + my $script = curfile->dirname->sibling('myapp.pl'); my $t = Test::Mojo->new($script); $t->get_ok('/')->status_is(200)->content_like(qr/Funky/); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Renderer.pm new/Mojolicious-8.25/lib/Mojolicious/Renderer.pm --- old/Mojolicious-8.24/lib/Mojolicious/Renderer.pm 2019-09-11 22:25:14.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious/Renderer.pm 2019-09-25 21:21:29.000000000 +0200 @@ -3,7 +3,7 @@ use Mojo::Cache; use Mojo::DynamicMethods; -use Mojo::File 'path'; +use Mojo::File qw(curfile path); use Mojo::JSON 'encode_json'; use Mojo::Loader 'data_section'; use Mojo::Util qw(decamelize encode gzip md5_sum monkey_patch); @@ -18,7 +18,7 @@ has paths => sub { [] }; # Bundled templates -my $TEMPLATES = path(__FILE__)->sibling('resources', 'templates'); +my $TEMPLATES = curfile->sibling('resources', 'templates'); sub DESTROY { Mojo::Util::_teardown($_) for @{shift->{namespaces}} } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious/Static.pm new/Mojolicious-8.25/lib/Mojolicious/Static.pm --- old/Mojolicious-8.24/lib/Mojolicious/Static.pm 2019-06-21 22:49:06.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious/Static.pm 2019-09-25 21:21:29.000000000 +0200 @@ -4,12 +4,12 @@ use Mojo::Asset::File; use Mojo::Asset::Memory; use Mojo::Date; -use Mojo::File 'path'; +use Mojo::File qw(curfile path); use Mojo::Loader qw(data_section file_is_binary); use Mojo::Util qw(encode md5_sum trim); # Bundled files -my $PUBLIC = path(__FILE__)->sibling('resources', 'public'); +my $PUBLIC = curfile->sibling('resources', 'public'); my %EXTRA = $PUBLIC->list_tree->map( sub { join('/', @{$_->to_rel($PUBLIC)}), $_->realpath->to_string })->each; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Mojolicious.pm new/Mojolicious-8.25/lib/Mojolicious.pm --- old/Mojolicious-8.24/lib/Mojolicious.pm 2019-09-11 22:25:14.000000000 +0200 +++ new/Mojolicious-8.25/lib/Mojolicious.pm 2019-09-12 00:33:09.000000000 +0200 @@ -59,7 +59,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Supervillain'; -our $VERSION = '8.24'; +our $VERSION = '8.25'; sub BUILD_DYNAMIC { my ($class, $method, $dyn_methods) = @_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/lib/Test/Mojo.pm new/Mojolicious-8.25/lib/Test/Mojo.pm --- old/Mojolicious-8.24/lib/Test/Mojo.pm 2019-06-21 22:48:45.000000000 +0200 +++ new/Mojolicious-8.25/lib/Test/Mojo.pm 2019-09-25 21:21:29.000000000 +0200 @@ -928,8 +928,8 @@ L<Mojolicious::Plugin::JSONConfig> for tests. # Load application script relative to the "t" directory - use Mojo::File 'path'; - my $t = Test::Mojo->new(path(__FILE__)->dirname->sibling('myapp.pl')); + use Mojo::File 'curfile'; + my $t = Test::Mojo->new(curfile->dirname->sibling('myapp.pl')); =head2 options_ok diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/base.t new/Mojolicious-8.25/t/mojo/base.t --- old/Mojolicious-8.24/t/mojo/base.t 2019-05-31 21:29:01.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/base.t 2019-09-25 21:21:29.000000000 +0200 @@ -2,8 +2,8 @@ use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; package Mojo::BaseTest; use Mojo::Base -strict; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/bytestream.t new/Mojolicious-8.25/t/mojo/bytestream.t --- old/Mojolicious-8.24/t/mojo/bytestream.t 2019-05-31 21:28:51.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/bytestream.t 2019-09-25 21:21:29.000000000 +0200 @@ -1,7 +1,6 @@ use Mojo::Base -strict; use Test::More; -use FindBin; use Mojo::ByteStream 'b'; # Tap into method chain diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/daemon.t new/Mojolicious-8.25/t/mojo/daemon.t --- old/Mojolicious-8.24/t/mojo/daemon.t 2019-05-31 21:28:43.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/daemon.t 2019-09-25 21:21:29.000000000 +0200 @@ -6,9 +6,8 @@ } use Test::More; -use FindBin; use IO::Socket::INET; -use Mojo::File 'path'; +use Mojo::File qw(curfile path); use Mojo::IOLoop; use Mojo::Log; use Mojo::Server::Daemon; @@ -79,14 +78,14 @@ # Loading my $daemon = Mojo::Server::Daemon->new; -my $path = "$FindBin::Bin/lib/../lib/myapp.pl"; +my $path = curfile->sibling('lib', '..', 'lib', 'myapp.pl'); is ref $daemon->load_app($path), 'Mojolicious::Lite', 'right reference'; is $daemon->app->config('script'), path($path)->to_abs, 'right script name'; is ref $daemon->build_app('TestApp'), 'TestApp', 'right reference'; is ref $daemon->app, 'TestApp', 'right reference'; # Load broken app -my $bin = $FindBin::Bin; +my $bin = curfile->dirname; eval { Mojo::Server::Daemon->new->load_app("$bin/lib/Mojo/LoaderTest/A.pm"); }; like $@, qr/did not return an application object/, 'right error'; eval { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/daemon_ipv6_tls.t new/Mojolicious-8.25/t/mojo/daemon_ipv6_tls.t --- old/Mojolicious-8.24/t/mojo/daemon_ipv6_tls.t 2019-06-12 12:20:58.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/daemon_ipv6_tls.t 2019-09-25 21:21:29.000000000 +0200 @@ -5,8 +5,8 @@ use Test::More; use Mojo::IOLoop::TLS; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; plan skip_all => 'set TEST_IPV6 to enable this test (developer only!)' unless $ENV{TEST_IPV6} || $ENV{TEST_ALL}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/exception.t new/Mojolicious-8.25/t/mojo/exception.t --- old/Mojolicious-8.24/t/mojo/exception.t 2019-07-17 12:33:13.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/exception.t 2019-09-25 21:21:29.000000000 +0200 @@ -2,7 +2,7 @@ use Test::More; use Mojo::Exception qw(check raise); -use Mojo::File 'path'; +use Mojo::File 'curfile'; package MojoTest::X::Foo; use Mojo::Base 'Mojo::Exception'; @@ -79,7 +79,7 @@ like wrapper1(2)->frames->[0][3], qr/wrapper1/, 'right subroutine'; # Inspect (UTF-8) -my $file = path(__FILE__)->sibling('exception', 'utf8.txt'); +my $file = curfile->sibling('exception', 'utf8.txt'); $e = Mojo::Exception->new("Whatever at $file line 3."); is_deeply $e->lines_before, [], 'no lines'; is_deeply $e->line, [], 'no line'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/file.t new/Mojolicious-8.25/t/mojo/file.t --- old/Mojolicious-8.24/t/mojo/file.t 2019-07-31 17:58:20.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/file.t 2019-09-25 21:21:29.000000000 +0200 @@ -6,7 +6,7 @@ use File::Basename qw(basename dirname); use File::Spec::Functions qw(abs2rel canonpath catfile rel2abs splitdir); use File::Temp; -use Mojo::File qw(path tempdir tempfile); +use Mojo::File qw(curfile path tempdir tempfile); use Mojo::Util 'encode'; # Constructor @@ -54,6 +54,10 @@ is path('file.t')->to_abs->dirname, scalar dirname(rel2abs 'file.t'), 'same path'; +# Current file +ok curfile->is_abs, 'path is absolute'; +is curfile, realpath(__FILE__), 'same path'; + # Checks ok path(__FILE__)->to_abs->is_abs, 'path is absolute'; ok !path('file.t')->is_abs, 'path is not absolute'; @@ -193,8 +197,8 @@ # List is_deeply path('does_not_exist')->list->to_array, [], 'no files'; -is_deeply path(__FILE__)->list->to_array, [], 'no files'; -my $lib = path(__FILE__)->sibling('lib', 'Mojo'); +is_deeply curfile->list->to_array, [], 'no files'; +my $lib = curfile->sibling('lib', 'Mojo'); my @files = map { path($lib)->child(split '/') } ( 'DeprecationTest.pm', 'LoaderException.pm', 'LoaderException2.pm', 'TestConnectProxy.pm' @@ -217,7 +221,7 @@ # List tree is_deeply path('does_not_exist')->list_tree->to_array, [], 'no files'; -is_deeply path(__FILE__)->list_tree->to_array, [], 'no files'; +is_deeply curfile->list_tree->to_array, [], 'no files'; @files = map { path($lib)->child(split '/') } ( 'BaseTest/Base1.pm', 'BaseTest/Base2.pm', 'BaseTest/Base3.pm', 'DeprecationTest.pm', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/home.t new/Mojolicious-8.25/t/mojo/home.t --- old/Mojolicious-8.24/t/mojo/home.t 2019-07-29 19:19:59.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/home.t 2019-09-25 21:21:29.000000000 +0200 @@ -3,8 +3,7 @@ BEGIN { $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll' } use Test::More; -use FindBin; -use Mojo::File 'path'; +use Mojo::File qw(curfile path); use Mojo::HelloWorld; use Mojo::Home; @@ -60,8 +59,8 @@ is_deeply $home->to_array, path->to_abs->to_array, 'right path detected'; # Path generation -$home = Mojo::Home->new($FindBin::Bin); -my $path = path($FindBin::Bin); +$home = Mojo::Home->new(curfile->dirname); +my $path = curfile->dirname; is $home->rel_file('foo.txt'), $path->child('foo.txt'), 'right path'; is $home->rel_file('foo/bar.txt'), $path->child('foo', 'bar.txt'), 'right path'; is $home->rel_file('foo/bar.txt')->basename, 'bar.txt', 'right result'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/hypnotoad.t new/Mojolicious-8.25/t/mojo/hypnotoad.t --- old/Mojolicious-8.24/t/mojo/hypnotoad.t 2019-05-31 21:29:00.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/hypnotoad.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,9 +7,8 @@ plan skip_all => 'set TEST_HYPNOTOAD to enable this test (developer only!)' unless $ENV{TEST_HYPNOTOAD} || $ENV{TEST_ALL}; -use FindBin; use IO::Socket::INET; -use Mojo::File 'tempdir'; +use Mojo::File qw(curfile tempdir); use Mojo::IOLoop::Server; use Mojo::Server::Hypnotoad; use Mojo::UserAgent; @@ -95,7 +94,7 @@ EOF # Start -my $prefix = "$FindBin::Bin/../../script"; +my $prefix = curfile->dirname->dirname->sibling('script'); open my $start, '-|', $^X, "$prefix/hypnotoad", $script; sleep 3; sleep 1 while !_port($port2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/loader.t new/Mojolicious-8.25/t/mojo/loader.t --- old/Mojolicious-8.24/t/mojo/loader.t 2019-05-31 21:28:51.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/loader.t 2019-09-25 21:21:29.000000000 +0200 @@ -4,8 +4,8 @@ use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojo::Loader qw(data_section file_is_binary find_packages find_modules load_class); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/morbo.t new/Mojolicious-8.25/t/mojo/morbo.t --- old/Mojolicious-8.24/t/mojo/morbo.t 2019-05-31 21:28:41.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/morbo.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,8 +7,8 @@ plan skip_all => 'set TEST_MORBO to enable this test (developer only!)' unless $ENV{TEST_MORBO} || $ENV{TEST_ALL}; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use IO::Socket::INET; use Mojo::File 'tempdir'; @@ -38,7 +38,7 @@ # Start my $port = Mojo::IOLoop::Server->generate_port; -my $prefix = "$FindBin::Bin/../../script"; +my $prefix = curfile->dirname->dirname->sibling('script'); my $pid = open my $server, '-|', $^X, "$prefix/morbo", '-l', "http://127.0.0.1:$port", $script; sleep 1 while !_port($port); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/prefork.t new/Mojolicious-8.25/t/mojo/prefork.t --- old/Mojolicious-8.24/t/mojo/prefork.t 2019-05-31 21:28:41.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/prefork.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,7 +7,7 @@ plan skip_all => 'set TEST_PREFORK to enable this test (developer only!)' unless $ENV{TEST_PREFORK} || $ENV{TEST_ALL}; -use Mojo::File qw(path tempdir); +use Mojo::File qw(curfile path tempdir); use Mojo::IOLoop::Server; use Mojo::Server::Prefork; use Mojo::UserAgent; @@ -32,7 +32,7 @@ ok !-e $file, 'file has been cleaned up'; # Bad PID file -my $bad = path(__FILE__)->sibling('does_not_exist', 'test.pid'); +my $bad = curfile->sibling('does_not_exist', 'test.pid'); $prefork = Mojo::Server::Prefork->new(pid_file => $bad); $prefork->app->log->level('debug')->unsubscribe('message'); my $log = ''; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/template.t new/Mojolicious-8.25/t/mojo/template.t --- old/Mojolicious-8.24/t/mojo/template.t 2019-07-07 23:47:35.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/template.t 2019-09-25 21:21:29.000000000 +0200 @@ -1,7 +1,7 @@ use Mojo::Base -strict; use Test::More; -use Mojo::File 'path'; +use Mojo::File qw(curfile path); use Mojo::Template; package MyTemplateExporter; @@ -1125,13 +1125,13 @@ # File $mt = Mojo::Template->new; -my $file = path(__FILE__)->sibling('templates', 'test.mt'); +my $file = curfile->sibling('templates', 'test.mt'); $output = $mt->render_file($file, 3); like $output, qr/23\nHello World!/, 'file'; # Exception in file $mt = Mojo::Template->new; -$file = path(__FILE__)->sibling('templates', 'exception.mt'); +$file = curfile->sibling('templates', 'exception.mt'); $output = $mt->render_file($file); isa_ok $output, 'Mojo::Exception', 'right exception'; like $output->message, qr/exception\.mt line 2/, 'message contains filename'; @@ -1159,7 +1159,7 @@ # Exception with UTF-8 context $mt = Mojo::Template->new; -$file = path(__FILE__)->sibling('templates', 'utf8_exception.mt'); +$file = curfile->sibling('templates', 'utf8_exception.mt'); $output = $mt->render_file($file); isa_ok $output, 'Mojo::Exception', 'right exception'; is $output->lines_before->[0][1], '☃', 'right line'; @@ -1178,7 +1178,7 @@ # Different encodings $mt = Mojo::Template->new(encoding => 'shift_jis'); -$file = path(__FILE__)->sibling('templates', 'utf8_exception.mt'); +$file = curfile->sibling('templates', 'utf8_exception.mt'); ok !eval { $mt->render_file($file) }, 'file not rendered'; like $@, qr/invalid encoding/, 'right error'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/user_agent_unix.t new/Mojolicious-8.25/t/mojo/user_agent_unix.t --- old/Mojolicious-8.24/t/mojo/user_agent_unix.t 2019-05-31 21:28:50.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/user_agent_unix.t 2019-09-25 21:21:29.000000000 +0200 @@ -3,11 +3,10 @@ BEGIN { $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll' } use Test::More; -use Mojo::File 'tempdir'; +use Mojo::File qw(curfile tempdir); use IO::Socket::UNIX; -use FindBin; -use lib "$FindBin::Bin/lib"; +use lib curfile->sibling('lib')->to_string; plan skip_all => 'set TEST_UNIX to enable this test (developer only!)' unless $ENV{TEST_UNIX} || $ENV{TEST_ALL}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/util.t new/Mojolicious-8.25/t/mojo/util.t --- old/Mojolicious-8.24/t/mojo/util.t 2019-07-31 21:08:53.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/util.t 2019-09-25 21:21:29.000000000 +0200 @@ -1,11 +1,10 @@ use Mojo::Base -strict; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Test::More; use Mojo::ByteStream 'b'; -use Mojo::File 'path'; use Mojo::DeprecationTest; use Sub::Util 'subname'; @@ -116,7 +115,7 @@ # extract_usage is extract_usage, "extract_usage test!\n", 'right result'; -is extract_usage(path($FindBin::Bin, 'lib', 'myapp.pl')), +is extract_usage(curfile->sibling('lib', 'myapp.pl')), "USAGE: myapp.pl daemon\n\n test\n123\n", 'right result'; =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/websocket_proxy.t new/Mojolicious-8.25/t/mojo/websocket_proxy.t --- old/Mojolicious-8.24/t/mojo/websocket_proxy.t 2019-05-31 21:28:51.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/websocket_proxy.t 2019-09-25 21:21:29.000000000 +0200 @@ -4,8 +4,8 @@ use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojo::IOLoop; use Mojo::IOLoop::Server; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojo/websocket_proxy_tls.t new/Mojolicious-8.25/t/mojo/websocket_proxy_tls.t --- old/Mojolicious-8.24/t/mojo/websocket_proxy_tls.t 2019-05-31 21:28:58.000000000 +0200 +++ new/Mojolicious-8.25/t/mojo/websocket_proxy_tls.t 2019-09-25 21:21:29.000000000 +0200 @@ -5,8 +5,8 @@ use Test::More; use Mojo::IOLoop::TLS; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; plan skip_all => 'set TEST_TLS to enable this test (developer only!)' unless $ENV{TEST_TLS} || $ENV{TEST_ALL}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/app.t new/Mojolicious-8.25/t/mojolicious/app.t --- old/Mojolicious-8.24/t/mojolicious/app.t 2019-05-31 21:29:09.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/app.t 2019-09-25 21:21:29.000000000 +0200 @@ -9,8 +9,8 @@ use Test::Mojo; use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojo::Asset::File; use Mojo::Date; @@ -407,7 +407,7 @@ $t->app->log->unsubscribe(message => $cb); # Check Last-Modified header for static files -my $path = path($FindBin::Bin, 'public_dev', 'hello.txt'); +my $path = curfile->sibling('public_dev', 'hello.txt'); my $size = Mojo::Asset::File->new(path => $path)->size; my $mtime = Mojo::Date->new(Mojo::Asset::File->new(path => $path)->mtime)->to_string; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/commands.t new/Mojolicious-8.25/t/mojolicious/commands.t --- old/Mojolicious-8.24/t/mojolicious/commands.t 2019-07-03 16:54:52.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/commands.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,8 +7,8 @@ use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojo::File qw(path tempdir); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/dispatcher_lite_app.t new/Mojolicious-8.25/t/mojolicious/dispatcher_lite_app.t --- old/Mojolicious-8.24/t/mojolicious/dispatcher_lite_app.t 2019-05-31 21:29:06.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/dispatcher_lite_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -5,8 +5,8 @@ use Test::Mojo; use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojo::Message::Response; use Mojolicious::Lite; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/embedded_app.t new/Mojolicious-8.25/t/mojolicious/embedded_app.t --- old/Mojolicious-8.24/t/mojolicious/embedded_app.t 2019-05-31 21:29:12.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/embedded_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -6,6 +6,7 @@ } use Test::More; +use Mojo::File 'curfile'; use Mojolicious::Lite; use Test::Mojo; @@ -13,8 +14,7 @@ app->secrets(['very secr3t!']); # Mount full external application a few times -use FindBin; -my $external = "$FindBin::Bin/external/script/my_app"; +my $external = curfile->sibling('external', 'script', 'my_app'); plugin Mount => {'/x/1' => $external}; plugin(Mount => ('/x/♥' => $external)); plugin Mount => {'MOJOLICIOUS.ORG/' => $external}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/embedded_lite_app.t new/Mojolicious-8.25/t/mojolicious/embedded_lite_app.t --- old/Mojolicious-8.24/t/mojolicious/embedded_lite_app.t 2019-05-31 21:29:14.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/embedded_lite_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,8 +7,8 @@ use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojolicious::Lite; use Test::Mojo; @@ -75,14 +75,14 @@ app->routes->namespaces(['MyTestApp']); # Mount full external application a few times -my $external = "$FindBin::Bin/external/myapp.pl"; +my $external = curfile->sibling('external', 'myapp.pl'); plugin Mount => {'/x/1' => $external}; my $route = plugin(Mount => ('/x/♥' => $external))->to(message => 'works 2!'); is $route->to->{message}, 'works 2!', 'right message'; is $route->pattern->defaults->{app}->same_name, 'myapp', 'right name'; -plugin Mount => {'/y/1' => "$FindBin::Bin/external/myapp2.pl"}; +plugin Mount => {'/y/1' => curfile->sibling('external', 'myapp2.pl')}; plugin Mount => {'mojolicious.org' => $external}; -plugin(Mount => ('/y/♥' => "$FindBin::Bin/external/myapp2.pl")) +plugin(Mount => ('/y/♥' => curfile->sibling('external', 'myapp2.pl'))) ->to(message => 'works 3!'); plugin Mount => {'MOJOLICIOUS.ORG/' => $external}; plugin Mount => {'*.example.com' => $external}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/external/script/my_app new/Mojolicious-8.25/t/mojolicious/external/script/my_app --- old/Mojolicious-8.24/t/mojolicious/external/script/my_app 2017-11-06 18:19:39.000000000 +0100 +++ new/Mojolicious-8.25/t/mojolicious/external/script/my_app 2019-09-25 21:21:29.000000000 +0200 @@ -3,8 +3,8 @@ use strict; use warnings; -use FindBin; -BEGIN { unshift @INC, "$FindBin::Bin/../lib" } +use Mojo::File 'curfile'; +use lib curfile->dirname->sibling('lib')->to_string; use Mojolicious::Commands; # Start command line interface for application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/external_app.t new/Mojolicious-8.25/t/mojolicious/external_app.t --- old/Mojolicious-8.24/t/mojolicious/external_app.t 2019-05-31 21:29:10.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/external_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,8 +7,8 @@ use Test::More; -use FindBin; -use lib "$FindBin::Bin/external/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('external', 'lib')->to_string; use Test::Mojo; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/external_lite_app.t new/Mojolicious-8.25/t/mojolicious/external_lite_app.t --- old/Mojolicious-8.24/t/mojolicious/external_lite_app.t 2019-05-31 21:29:15.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/external_lite_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -8,9 +8,9 @@ use Test::More; use Test::Mojo; -use Mojo::File 'path'; +use Mojo::File 'curfile'; -my $t = Test::Mojo->new(path(__FILE__)->dirname->child('external', 'myapp.pl')); +my $t = Test::Mojo->new(curfile->sibling('external', 'myapp.pl')); # Template from myapp.pl $t->get_ok('/')->status_is(200)->content_is(<<'EOF'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/json_config_lite_app.t new/Mojolicious-8.25/t/mojolicious/json_config_lite_app.t --- old/Mojolicious-8.24/t/mojolicious/json_config_lite_app.t 2019-06-20 18:42:17.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/json_config_lite_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -7,7 +7,7 @@ use Test::Mojo; use Test::More; -use Mojo::File 'path'; +use Mojo::File 'curfile'; use Mojolicious::Lite; # Default @@ -21,7 +21,7 @@ # Load plugins my $config = plugin j_s_o_n_config => {default => {foo => 'baz', hello => 'there'}}; -my $path = path(__FILE__)->to_abs->sibling('json_config_lite_app_abs.json'); +my $path = curfile->sibling('json_config_lite_app_abs.json'); plugin JSONConfig => {file => $path}; is $config->{foo}, 'bar', 'right value'; is $config->{hello}, 'there', 'right value'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/layouted_lite_app.t new/Mojolicious-8.25/t/mojolicious/layouted_lite_app.t --- old/Mojolicious-8.24/t/mojolicious/layouted_lite_app.t 2019-05-31 21:29:09.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/layouted_lite_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -5,8 +5,8 @@ use Test::Mojo; use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; use Mojolicious::Lite; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/production_app.t new/Mojolicious-8.25/t/mojolicious/production_app.t --- old/Mojolicious-8.24/t/mojolicious/production_app.t 2019-05-31 21:29:10.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/production_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -8,8 +8,8 @@ use Test::Mojo; use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; my $t = Test::Mojo->new('MojoliciousTest'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/static_lite_app.t new/Mojolicious-8.25/t/mojolicious/static_lite_app.t --- old/Mojolicious-8.24/t/mojolicious/static_lite_app.t 2019-05-31 21:29:07.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/static_lite_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -6,7 +6,7 @@ use Test::More; use Mojo::Asset::Memory; use Mojo::Date; -use Mojo::File 'path'; +use Mojo::File 'curfile'; use Mojolicious::Lite; hook after_static => sub { shift->app->log->debug('Static file served') }; @@ -36,7 +36,7 @@ get '/file' => sub { my $c = shift; - $c->reply->file(path(__FILE__)->dirname->child('templates2', '42.html.ep')); + $c->reply->file(curfile->sibling('templates2', '42.html.ep')); }; my $t = Test::Mojo->new; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-8.24/t/mojolicious/testing_app.t new/Mojolicious-8.25/t/mojolicious/testing_app.t --- old/Mojolicious-8.24/t/mojolicious/testing_app.t 2019-05-31 21:29:12.000000000 +0200 +++ new/Mojolicious-8.25/t/mojolicious/testing_app.t 2019-09-25 21:21:29.000000000 +0200 @@ -8,8 +8,8 @@ use Test::Mojo; use Test::More; -use FindBin; -use lib "$FindBin::Bin/lib"; +use Mojo::File 'curfile'; +use lib curfile->sibling('lib')->to_string; my $t = Test::Mojo->new('MojoliciousTest'); my $success = '';
participants (1)
-
root