Skip to content

Commit 615e61a

Browse files
committed
Remove end-of-line spaces because they drive Sawyer mad
1 parent 36c9d64 commit 615e61a

14 files changed

+66
-66
lines changed

lib/Dancer2.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ automatically installed with C<Dancer2>.
406406
407407
=head2 Do not use the C<dance> keyword!
408408
409-
L<Dancer> and early versions of C<Dancer2> used the C<dance> keyword to
409+
L<Dancer> and early versions of C<Dancer2> used the C<dance> keyword to
410410
run an application. Do B<not> use it to run new applications! The keyword
411411
still exists for compatibility's sake, but its use is discouraged.
412412

lib/Dancer2/CLI/Gen.pm

+14-14
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ option skel => (
7474
format_doc => 'directory',
7575
required => 0,
7676
default => sub{
77-
my $self = shift;
78-
path( $self->parent_command->_dist_dir, 'skel' );
77+
my $self = shift;
78+
path( $self->parent_command->_dist_dir, 'skel' );
7979
},
8080
);
8181

@@ -95,7 +95,7 @@ option git => (
9595
default => 0,
9696
);
9797

98-
option remote => (
98+
option remote => (
9999
is => 'ro',
100100
short => 'r',
101101
doc => 'URI for git repository (implies -g)',
@@ -108,8 +108,8 @@ option remote => (
108108
sub BUILD {
109109
my ( $self, $args ) = @_;
110110

111-
$self->osprey_usage( 1, qq{
112-
Invalid application name. Application names must not contain single colons,
111+
$self->osprey_usage( 1, qq{
112+
Invalid application name. Application names must not contain single colons,
113113
dots, hyphens or start with a number.
114114
}) unless is_module_name( $self->application );
115115

@@ -183,7 +183,7 @@ sub _check_git {
183183
184184
WARNING: Couldn't initialize a git repo despite being asked to do so.
185185
186-
To resolve this, cd to your application directory and run the following
186+
To resolve this, cd to your application directory and run the following
187187
commands:
188188
189189
git init
@@ -200,13 +200,13 @@ commands:
200200
path( $gitignore )->copy( $app_path );
201201

202202
chdir File::Spec->rel2abs( $app_path ) or die "Can't cd to $app_path: $!";
203-
if( _run_shell_cmd( 'git', 'init') != 0 or
204-
_run_shell_cmd( 'git', 'add', '.') != 0 or
203+
if( _run_shell_cmd( 'git', 'init') != 0 or
204+
_run_shell_cmd( 'git', 'add', '.') != 0 or
205205
_run_shell_cmd( 'git', 'commit', "-m 'Initial commit of $app_name by Dancer2'" ) != 0 ) {
206206
print $git_error;
207207
}
208208
else {
209-
if( $self->remote &&
209+
if( $self->remote &&
210210
_run_shell_cmd( 'git', 'remote', 'add', 'origin', $self->remote ) != 0 ) {
211211
print $git_error;
212212
print " git remote add origin " . $self->remote . "\n";
@@ -290,7 +290,7 @@ sub _build_file_list {
290290
warn "File not found: $file" unless $file->exists; # Paranoia
291291
next if $file->basename =~ m{^\.git(/|$)};
292292
next if $file->is_dir;
293-
293+
294294
my $filename = $file->relative( $from );
295295
push @result, [ $file, path( $to, $filename )];
296296
}
@@ -315,7 +315,7 @@ sub _copy_templates {
315315
$to_dir->mkpath;
316316
}
317317

318-
# Skeleton files whose names are prefixed with + need to be executable, but we must strip
318+
# Skeleton files whose names are prefixed with + need to be executable, but we must strip
319319
# that from the name when copying them
320320
my $to_file = path( $to )->basename;
321321
my $ex = ( $to_file =~ s/^\+// );
@@ -378,7 +378,7 @@ sub _process_template {
378378
return $engine->render( \$template, $tokens );
379379
}
380380

381-
# These are good candidates to move to Dancer2::CLI if other commands
381+
# These are good candidates to move to Dancer2::CLI if other commands
382382
# need them later.
383383
sub _get_app_path {
384384
my ( $self, $path, $appname ) = @_;
@@ -431,8 +431,8 @@ sub _run_shell_cmd {
431431

432432
my $exit_status = try {
433433
my $pid = IPC::Open3::open3(
434-
my $stdin,
435-
my $stdout,
434+
my $stdin,
435+
my $stdout,
436436
my $stderr = Symbol::gensym,
437437
@cmds,
438438
);

lib/Dancer2/Cookbook.pod

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ In your C<config.yaml>:
104104
Baz : 0
105105

106106
In your main route controller:
107-
107+
108108
use Dancer2;
109109
use Module::Runtime 'require_module';
110110

@@ -737,8 +737,8 @@ Assuming we have the original user-creation form submitting a username and passw
737737
use Dancer2::Plugin::Passphrase;
738738
post '/register' => sub {
739739
my $username = query_parameters->get('username');
740-
my $password = passphrase(
741-
query_parameters->get('password')
740+
my $password = passphrase(
741+
query_parameters->get('password')
742742
)->generate;
743743

744744
# $password is now a hashed password object

lib/Dancer2/Core/Role/ConfigReader.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ sub _build_config_files {
119119
if (my $ext = $ENV{DANCER_CONFIG_EXT}) {
120120
if (grep { $ext eq $_ } @available_exts) {
121121
@exts = $ext;
122-
warn "Only looking for configs ending in '$ext'\n"
122+
warn "Only looking for configs ending in '$ext'\n"
123123
if $ENV{DANCER_CONFIG_VERBOSE};
124124
} else {
125125
warn "DANCER_CONFIG_EXT environment variable set to '$ext' which\n" .
@@ -155,7 +155,7 @@ sub _build_config {
155155
$default,
156156
map {
157157
warn "Merging config file $_\n" if $ENV{DANCER_CONFIG_VERBOSE};
158-
$self->load_config_file($_)
158+
$self->load_config_file($_)
159159
} @{ $self->config_files }
160160
);
161161

lib/Dancer2/Core/Role/SessionFactory.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ argument and must return a hash reference of session data.
405405
=head2 change_id
406406
407407
Changes the session ID of the corresponding session.
408-
408+
409409
MySessionFactory->change_id(session => $session_object);
410410
411411
The method C<_change_id> must be implemented. It must take C<$old_id> and

lib/Dancer2/Manual.pod

+3-3
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ requests.
187187
=head2 Route Handlers
188188

189189
The route action is the code reference declared. It can access parameters
190-
through the specific L<route_parameters|/route_parameters>,
190+
through the specific L<route_parameters|/route_parameters>,
191191
L<query_parameters|/query_parameters>, and L<body_parameters|/body_parameters>
192-
keywords, which return a L<Hash::MultiValue> object.
192+
keywords, which return a L<Hash::MultiValue> object.
193193
This hashref is a merge of the route pattern matches and the request params.
194194

195195
You can find more details about how params are built and how to access them
@@ -2263,5 +2263,5 @@ For example, take the following example:
22632263

22642264
C<get> and C<route_parameters> are keywords provided by Dancer2.
22652265

2266-
See L<Dancer2::Manual::Keywords/DSL Keywords manual> for a complete list of
2266+
See L<Dancer2::Manual::Keywords/DSL Keywords manual> for a complete list of
22672267
keywords provided by Dancer2.

lib/Dancer2/Manual/Deployment.pod

+2-2
Original file line numberDiff line numberDiff line change
@@ -712,13 +712,13 @@ The following modules can be used to speed up an app in Dancer2:
712712

713713
If you generated your application with C<dancer2 gen>, you can easily install
714714
these with the following command:
715-
715+
716716
cpanm --installdeps . --with-feature=accelerate
717717

718718
To build them, you will need access to a C compiler, and using these modules
719719
will prevent you from fatpacking your application.
720720

721-
These modules are installed by default when building a Docker container
721+
These modules are installed by default when building a Docker container
722722
containing your application.
723723

724724
=cut

lib/Dancer2/Manual/Keywords.pod

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ route's regular expression.
6666
}x
6767
, sub {
6868
my $value_for = captures;
69-
"i don't want to $value_for->{action} " .
69+
"i don't want to $value_for->{action} " .
7070
"the $value_for->{object} $value_for->{id} !"
7171
};
7272

@@ -162,7 +162,7 @@ Deprecated. Use L<app> instead.
162162

163163
=head2 dance
164164

165-
Alias for the C<start> keyword. L<to_app> is preferable.
165+
Alias for the C<start> keyword. L<to_app> is preferable.
166166

167167
=head2 dancer_app
168168

@@ -202,9 +202,9 @@ Defines a route for HTTP B<DELETE> requests to the given URL:
202202

203203
=head2 delayed
204204

205-
Stream a response asynchronously. For more information, please see
206-
L<Dancer2::Manual/Delayed responses (Async/Streaming)>, or
207-
L<this article|https://advent.perldancer.org/2020/22> in the 2020 Dancer
205+
Stream a response asynchronously. For more information, please see
206+
L<Dancer2::Manual/Delayed responses (Async/Streaming)>, or
207+
L<this article|https://advent.perldancer.org/2020/22> in the 2020 Dancer
208208
Advent Calendar.
209209

210210
=head2 dirname
@@ -215,7 +215,7 @@ Returns the dirname of the path given:
215215

216216
=head2 done
217217

218-
Close the streaming connection. Can only be called within a streaming
218+
Close the streaming connection. Can only be called within a streaming
219219
response callback.
220220

221221
=head2 dsl
@@ -689,7 +689,7 @@ Returns request header(s).
689689

690690
=head2 response
691691

692-
Returns the current response object, which is of type
692+
Returns the current response object, which is of type
693693
L<Dancer2::Core::Route::REQUEST>.
694694

695695
=head2 response_header

lib/Dancer2/Manual/Migration.pod

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ The session keyword has multiple states:
526526
=item * No arguments
527527

528528
Without any arguments, the session keyword returns a L<Dancer2::Core::Session>
529-
object, which has methods for L<read|Dancer2::Core::Session/read>,
529+
object, which has methods for L<read|Dancer2::Core::Session/read>,
530530
L<write|Dancer2::Core::Session/write>, and L<delete|Dancer2::Core::Session/delete>.
531531

532532
my $session = session;

lib/Dancer2/Plugin.pm

+10-10
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,8 @@ Calls to C<plugin_keywords> are cumulative.
799799
For perl 5.12 and higher, keywords can also be defined by adding the C<:PluginKeyword> attribute
800800
to the function you wish to export.
801801
802-
For Perl 5.10, the export triggered by the sub attribute comes too late in the
803-
game, and the keywords won't be exported in the application namespace.
802+
For Perl 5.10, the export triggered by the sub attribute comes too late in the
803+
game, and the keywords won't be exported in the application namespace.
804804
805805
sub foo :PluginKeyword { ... }
806806
@@ -937,7 +937,7 @@ do the following in a test:
937937
};
938938
939939
flibble(45); # plugin keyword called which causes config read
940-
940+
941941
set plugins => {
942942
FooBar => {
943943
wibble => 0, # this will NOT change plugin config
@@ -979,16 +979,16 @@ don't want anything imported via empty parentheses when C<use>ing the module:
979979
It's easy to use plugins from within a plugin:
980980
981981
package Dancer2::Plugin::SourPuss;
982-
983-
use Dancer2::Plugin;
984-
use Dancer2::Plugin::Polite;
985-
986-
sub my_keyword { my $smiley = smiley(); }
982+
983+
use Dancer2::Plugin;
984+
use Dancer2::Plugin::Polite;
985+
986+
sub my_keyword { my $smiley = smiley(); }
987987
988988
1;
989989
990990
This does not export C<smiley()> into your application - it is only available
991-
from within your plugin. However, from the example above, you can wrap
991+
from within your plugin. However, from the example above, you can wrap
992992
DSL from other plugins and make it available from your plugin.
993993
994994
=head2 Utilizing other plugins
@@ -1035,7 +1035,7 @@ Or using their alias:
10351035
10361036
$plugin->app->execute_hook( 'on_route_exception' );
10371037
1038-
B<Note:> If your plugin consumes a plugin that declares any hooks, those hooks
1038+
B<Note:> If your plugin consumes a plugin that declares any hooks, those hooks
10391039
are added to your application, even though DSL is not.
10401040
10411041
=head2 Writing Test Gotchas

lib/Dancer2/Policy.pod

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ removals will double in length. After six months with no warning, a user's ban
5959
length is reset. Removals, like warnings, are public.
6060

6161
The list of moderators consists of all active core developers. This includes,
62-
in alphabetical order, Alberto Simões, David Precious, Jason Crome, Mickey
63-
Nasriachi, Peter Mottram, Russell Jenkins, Sawyer X, Stefan Hornburg (Racke),
62+
in alphabetical order, Alberto Simões, David Precious, Jason Crome, Mickey
63+
Nasriachi, Peter Mottram, Russell Jenkins, Sawyer X, Stefan Hornburg (Racke),
6464
Steven Humphrey, and Yanick Champoux.
6565

6666
This list might additionally grow to active members of the community who have
@@ -80,10 +80,10 @@ As a core principle, abuse is never tolerated. One cannot berate, insult,
8080
debase, deride, put down, or vilify anyone, or act towards anyone in a way
8181
intending to hurt them.
8282

83-
The community specifically considers as abuse any attempts to otherize anyone
84-
by any individual characteristic, including, but not limited to, their
85-
technical skill, knowledge or by their age, colour, disability, gender,
86-
language, national or social origin, political or other opinion, race,
83+
The community specifically considers as abuse any attempts to otherize anyone
84+
by any individual characteristic, including, but not limited to, their
85+
technical skill, knowledge or by their age, colour, disability, gender,
86+
language, national or social origin, political or other opinion, race,
8787
religion, sex, or sexual orientation.
8888

8989
The community aims to maintain a safe space for everyone, in any forum it

lib/Dancer2/Template/Simple.pm

+5-5
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ To use this engine, you may configure L<Dancer2> via C<config.yaml>:
153153
154154
=head1 DESCRIPTION
155155
156-
This template engine is primarily to serve as a migration path for users of
157-
L<Dancer>. It should be fine for development purposes, but you would be
156+
This template engine is primarily to serve as a migration path for users of
157+
L<Dancer>. It should be fine for development purposes, but you would be
158158
better served by using L<Dancer2::Template::TemplateToolkit> or one of the
159-
many alternatives available on CPAN to power an application with Dancer2
160-
in production environment.
159+
many alternatives available on CPAN to power an application with Dancer2
160+
in production environment.
161161
162-
C<Dancer2::Template::Simple> is written in pure Perl and has no C bindings
162+
C<Dancer2::Template::Simple> is written in pure Perl and has no C bindings
163163
to accelerate the template processing.
164164
165165
=head1 SYNTAX

lib/Dancer2/Template/TemplateToolkit.pm

+9-9
Original file line numberDiff line numberDiff line change
@@ -152,26 +152,26 @@ A subclass to use the aforementioned L<Template::Stash::AutoEscaping> might look
152152
153153
package Dancer2::Template::TemplateToolkit::AutoEscaping;
154154
# or MyApp::
155-
155+
156156
use Moo;
157157
use Template::Stash::AutoEscaping;
158-
158+
159159
extends 'Dancer2::Template::TemplateToolkit';
160-
160+
161161
around '_build_engine' => sub {
162162
my $orig = shift;
163163
my $self = shift;
164-
164+
165165
my $tt = $self->$orig(@_);
166-
166+
167167
# replace the stash object
168168
$tt->service->context->{STASH} = Template::Stash::AutoEscaping->new(
169169
$self->config->{STASH}
170170
);
171-
171+
172172
return $tt;
173173
};
174-
174+
175175
1;
176176
177177
You can then use this new subclass in your config file instead of C<template_toolkit>.
@@ -208,11 +208,11 @@ used. Cached templates are automatically updated when you update the original te
208208
209209
By default, cached templates are saved in the same directory as your template. To save
210210
cached templates in a different directory, you can set the C<COMPILE_DIR> property in your
211-
Dancer2 configuration file.
211+
Dancer2 configuration file.
212212
213213
Please see L<Template::Manual::Config/Caching_and_Compiling_Options> for further
214214
details and more caching options.
215-
215+
216216
=head1 SEE ALSO
217217
218218
L<Dancer2>, L<Dancer2::Core::Role::Template>, L<Template::Toolkit>.

0 commit comments

Comments
 (0)