File: Keywords.pod

package info (click to toggle)
libdancer2-perl 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,768 kB
  • sloc: perl: 8,671; sql: 14; makefile: 8
file content (803 lines) | stat: -rw-r--r-- 21,346 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
# ABSTRACT: Dancer2 DSL Keyword Reference
package Dancer2::Manual::Keywords;

__END__

=pod

=encoding UTF-8

=head1 NAME

Dancer2::Manual::Keywords - Dancer2 DSL Keyword Reference

=head1 VERSION

version 2.0.1

=head1 Dancer2 Keyword Guide

This guide categorizes all Dancer2 keywords with descriptions, usage
guidance, and relationships with other keywords. Each entry links to the
relevant section in the L<Dancer2 Manual|Dancer2::Manual>.

=head1 Routing Keywords

=head2 L<any|Dancer2::Manual/"HTTP Methods: Visitor Actions">

Defines a route that responds to any HTTP method.

B<When to use>: Handle routes that accept multiple methods (e.g., C<GET>
and C<POST>).

B<Related Keywords>: All HTTP methods.

=head2 L<del|Dancer2::Manual/"HTTP Methods: Visitor Actions">

Defines a route that responds to HTTP C<DELETE> requests.

B<When to use>: Delete resources.

B<Related Keywords>: L</get>, L</post>, L</put>, L</patch>, L</options>, L</any>

=head2 L<get|Dancer2::Manual/get>

Defines a route that responds to HTTP C<GET> requests. Automatically
creates a C<HEAD> route.

B<When to use>: Fetch static resources or perform read-only actions.

B<Related Keywords>: L</post>, L</put>, L</del>, L</patch>, L</options>, L</any>

=head2 L<options|Dancer2::Manual/"HTTP Methods: Visitor Actions">

Defines a route that responds to HTTP C<OPTIONS> requests.

B<When to use>: Check available HTTP methods for a resource.

B<Related Keywords>: All HTTP methods.

=head2 L<patch|Dancer2::Manual/"HTTP Methods: Visitor Actions">

Defines a route that responds to HTTP C<PATCH> requests, often for partial
updates.

B<When to use>: Partially update existing resources.

B<Related Keywords>: L</get>, L</post>, L</put>, L</del>, L</options>, L</any>

=head2 L<post|Dancer2::Manual/post>

Defines a route that responds to HTTP C<POST> requests, typically for form
submissions or resource creation.

B<When to use>: Submit forms, upload files, or create resources.

B<Related Keywords>: L</get>, L</put>, L</del>, L</patch>, L</options>, L</any>

=head2 L<prefix|Dancer2::Manual/"Organizing routes and growing your app using prefix">

Defines a common path prefix for grouped routes.

B<When to use>: Organize routes logically under a shared prefix.

B<Related Keywords>: All HTTP methods.

=head2 L<put|Dancer2::Manual/"HTTP Methods: Visitor Actions">

Defines a route that responds to HTTP C<PUT> requests, often for updating
resources.

B<When to use>: Update existing resources in an idempotent way.

B<Related Keywords>: L</get>, L</post>, L</del>, L</patch>, L</options>, L</any>

=head2 L<splat|Dancer2::Manual/"Wildcard Route Parameters">

Retrieves a list value captured by a wildcard parameter in routes.

B<When to use>: Use with wildcard routes to capture arbitrary path segments.

B<Related Keywords>: L</captures>

=head1 URL and Route Helper Keywords

=head2 L<uri_for|Dancer2::Manual/uri_for>

Constructs a URI for a given path and query parameters.

B<When to use>: Generate URLs for links and redirects.

B<Related Keywords>: L</uri_for_route>

=head2 L<uri_for_route|Dancer2::Manual/uri_for_route>

Constructs a URI for a named route.

B<When to use>: Generate URLs based on route names and parameters.

B<Best Practice>: Use L</uri_for_route> with named routes to ensure
consistency even if route paths change.

B<Related Keywords>: L</uri_for>

=head1 Request Handling Keywords

=head2 L<body_parameters|Dancer2::Manual/body_parameters>

Retrieves parameters specifically from the request body.

B<When to use>: Handle C<POST> or C<PUT> data.

B<Related Keywords>: L</query_parameters>, L</route_parameters>, L</params>.

=head2 L<captures|Dancer2::Manual/"Regex Route Matching">

Accesses all regex capture groups from a route pattern.

B<When to use>: Extract parts of a URL matched by a regex route.

B<Related Keywords>: L</splat>

=head2 context

Deprecated. Use L</app> instead.

B<See also>: L</app>

=head2 L<param|Dancer2::Manual/"param and params (Not Recommended)">

Retrieves a parameter from the request (query, body, or route parameters).

B<When to use>: Not recommended. Use L</query_parameters>, L</body_parameters>,
or L</route_parameters> for clarity.

B<Best Practice>: Avoid using L</param> in new code to prevent confusion
between parameter sources. Instead, use more specific keywords.

B<Related Keywords>: L</params>, L</query_parameters>, L</body_parameters>, L</route_parameters>

=head2 L<params|Dancer2::Manual/"param and params (Not Recommended)">

Returns all parameters from the request as a hash reference.

B<When to use>: Retrieve all request parameters at once.

B<Best Practice>: Prefer specific keywords like L</query_parameters> for
clarity in code.

B<Related Keywords>: L</param>, L</query_parameters>, L</body_parameters>, L</route_parameters>

=head2 L<query_parameters|Dancer2::Manual/query_parameters>

Retrieves parameters specifically from the query string.

B<When to use>: Handle parameters in the query string (e.g., for searches).

B<Related Keywords>: L</body_parameters>, L</route_parameters>, L</params>

=head2 L<request|Dancer2::Core::Request>

Provides access to the current HTTP request object.

B<When to use>: Get details about the incoming request (headers, method,
path).

B<Related Keywords>: L</response>, L</params>, L</header>

=head2 request_data

Retrieves the raw data from the request body. If a serializer is set,
data will be automatically deserialized.

B<When to use>: Access the unprocessed body content of the request, especially
when dealing with custom or non-standard payloads.

B<Related Keywords>: L</request>, L</body_parameters>, L</params>

=head2 L<request_header|Dancer2::Manual/request_header>

Fetches the value of a specific header from the incoming request.

B<When to use>: Obtain information from request headers, such as 'User-Agent'
or 'Authorization'.

B<Related Keywords>: L</headers>, L</response_header>

=head2 L<route_parameters|Dancer2::Manual/route_parameters>

Retrieves parameters from the route pattern.

B<When to use>: Handle named or wildcard route parameters.

B<Related Keywords>: L</query_parameters>, L</body_parameters>, L</params>

=head2 L<upload|Dancer2::Manual/upload>

Uploads a file and makes it accessible as a L<Dancer2::Core::Request::Upload>
object.

If you named multiple files with the same name, C<upload> keyword returns
an array of L<Dancer2::Core::Request::Upload> objects:

    post '/some/route' => sub {
        my ($file1, $file2) = upload('files_input');
        # $file1 and $file2 are Dancer2::Core::Request::Upload objects
    };

You can also access the raw hashref of parsed uploads via the current request object:

    post '/some/route' => sub {
        my $all_uploads = request->uploads;
        # $all_uploads->{'file_input_foo'} is a Dancer2::Core::Request::Upload object
        # $all_uploads->{'files_input'} is an arrayref of Dancer2::Core::Request::Upload objects
    };

B<When to use>: To handle file uploads from client requests.

B<Related Keywords>: L</uploads>, L</request>

=head1 Response Handling Keywords

=head2 L<content|Dancer2::Manual/"content">

Sets the content of the response. This B<only> works within a delayed
response.

This will crash:

    get '/' => sub {
        content 'Hello, world!';
    };

But this will work just fine:

    get '/' => sub {
        delayed {
            content 'Hello, world!';
        };
    };

B<When to use>: Directly set content of an asynchronous response.

B<Related Keywords>: L</response>

=head2 L<content_type|Dancer2::Manual/"Manually Adjusting MIME Settings">

Sets the C<Content-Type> header of the response.

B<When to use>: Specify the MIME type of the response.

B<Related Keywords>: L</header>

=head2 L<decode_json|Dancer2::Manual/decode_json>

Deserializes a JSON string to a Perl data structure. Does not trigger
serialization hooks.

B<When to use>: When you need to translate incoming JSON to a Perl hashref.

B<Related Keywords>: L</encode_json>, L</from_json>

=head2 L<delayed|Dancer2::Manual/delayed>

Initiates an asynchronous response. Requires a Plack/PSGI server capable
of serving requests asynchronously.

B<When to use>: When starting an asynchronous reponse.

B<Related Keywords>: L</done>, L</flush>

=head2 L<done|Dancer2::Manual/done>

Finalizes an asynchronous repsonse and closes the connection. Can only
be run within the streaming response callback.

B<When to use>: When finishing delivery of data asynchronously.

B<See also>: L</delayed>, L</flush>

=head2 L<encode_json|Dancer2::Manual/encode_json>

Serializes a data structure to a UTF-8 encoded binary JSON string. Calling
this keyword will not trigger the application's serializer hooks.

B<When to use>: When needing to translate a Perl data structure to JSON.

B<See also>: L</decode_json>, L</to_json>

=head2 L<flush|Dancer2::Manual/flush>

Flushes content headers when streaming a response. This is necessary when
C<content> is called multiple times.

B<When to use>: When streaming large amounts of data (such as video)
asynchronously.

B<See also>: L</delayed>, L</done>

=head2 L<forward|Dancer2::Manual/forward>

Forwards the request to another route handler.

B<When to use>: Internally redirect to another route within the app.

B<Related Keywords>: L</pass>

=head2 L<from_dumper|Dancer2::Manual/from_dumper>

Deserializes a L<Data::Dumper> structure.

B<When to use>: When you need to turn a L<Data::Dumper> structure into a
Perl hashref.

B<See also>: L</to_dumper>, L</from_json>

=head2 L<from_json|Dancer2::Manual/from_json>

Deserializes a JSON string into a Perl data structure. Does not account
for UTF-8 characters.

B<When to use>: Decode JSON data from the client. L</decode_json> is likely
what you want.

B<Related Keywords>: L</to_json>

=head2 L<from_yaml|Dancer2::Manual/from_yaml>

Deserializes a YAML structure.

B<When to use>: When you need to turn YAML into a Perl hashref.

B<See also>: L</to_yaml>, L</from_json>

=head2 L<halt|Dancer2::Manual/halt>

Halts request processing and sends a response immediately.

B<When to use>: Stop processing and return a response early.

B<Best Practice>: Combine L</halt> with L</status> to ensure appropriate
HTTP response codes are sent.

B<Related Keywords>: L</status>, L</send_error>

=head2 C<header>

Deprecated. Use L</response_header> instead.

B<Related Keywords>: L</response_header>.

=head2 C<headers>

Deprecated. Use L</response_headers> instead.

B<Related Keywords>: L</response_headers>.

=head2 L<pass|Dancer2::Manual/pass>

Passes control to the next matching route.

B<When to use>: Skip the current route and try the next one.

B<Related Keywords>: L</forward>

=head2 C<push_header>

Deprecated. Use L</push_response_header> instead.

B<When to use>: Don't. Use L</push_response_header>.

B<Related Keywords>: L</push_response_header>.

=head2 L<push_response_header|Dancer2::Manual/"Adding Additional Response Headers">

Adds a new value to an existing response header without replacing its current value.

B<When to use>: Append additional values to headers like 'Set-Cookie' or 'X-Forwarded-For'.

B<See also>: L</response_header>, L</response_headers>

=head2 L<redirect|Dancer2::Manual/redirect>

Redirects the client to a different location.

B<When to use>: Redirect users to another route or external URL.

B<Related Keywords>: L</status>

=head2 L<response|Dancer2::Core::Response>

Provides access to the current response object.

B<When to use>: Manipulate the outgoing response (headers, status, content).

B<Related Keywords>: L</request>, L</header>, L</content>

=head2 L<response_header|Dancer2::Manual/"Adding Additional Response Headers">

Sets or retrieves a specific header in the outgoing response.

B<When to use>: Modify or access response headers before sending them to the client.

B<Related Keywords>: L</header>, L</response_headers>

=head2 L<response_headers|Dancer2::Manual/"Adding Additional Response Headers">

Returns a hash reference of all headers set in the response.

B<When to use>: Inspect or manipulate multiple response headers simultaneously.

B<Related Keywords>: L</response_header>, L</header>

=head2 L<send_as|Dancer2::Manual/send_as>

Manually serializes and sends the response in a specific format.

B<When to use>: Control response serialization explicitly.

B<Related Keywords>: C<encode_json>, C<decode_json>.

=head2 L<send_error|Dancer2::Manual/send_error>

Immediately halts processing and sends an error response with a specific
status code.

B<When to use>: To send a custom error response.

B<Related Keywords>: L</halt>, L</status>

=head2 L<send_file|Dancer2::Manual/"Sending Static Files from a Route Handler">

Sends a file to the client.

B<When to use>: Send files from disk or in-memory data as a file.

B<Related Keywords>: L</send_as>

=head2 L<status|Dancer2::Manual/status>

Sets the HTTP status code for the response.

B<When to use>: Specify response codes (e.g., 200, 404).

B<Best Practice>: Combine L</status> with L</halt> for clearer error handling
when sending error responses.

B<Related Keywords>: L</halt>, L</send_error>

=head2 L<to_dumper|Dancer2::Manual/to_dumper>

Serializes a Perl data structure into a string using Data::Dumper.

B<When to use>: Convert complex data structures into a readable string format for debugging.

B<Related Keywords>: L</from_dumper>, L</to_yaml>, L</to_json>

=head2 L<to_json|Dancer2::Manual/to_json>

Serializes a Perl data structure to JSON. Does not account or UTF-8
characters.

B<When to use>: Encode data to JSON format.

B<Related Keywords>: L</from_json>, L</send_as>

=head2 L<to_yaml|Dancer2::Manua/#to_yaml>

Serializes a Perl data structure into a YAML string.

B<When to use>: Convert data structures into YAML format.

B<Related Keywords>: L</from_yaml>, L</to_json>, L</to_dumper>

=head1 Session and Cookie Keywords

=head2 L<cookie|Dancer2::Manual/"Setting and Updating Cookies">

Retrieves the value of a specific cookie from the request.

B<When to use>: Access individual cookies.

B<Related Keywords>: L</cookies>, L</session>

=head2 L<cookies|Dancer2::Manual/"Retrieving Cookies">

Retrieves all cookies from the request as a hash reference.

B<When to use>: Inspect or manage multiple cookies.

B<Related Keywords>: L</cookie>

=head2 L<session|Dancer2::Manual/session>

Stores, retrieves, or removes data from the session.

B<When to use>: Persist user-specific data between requests.

B<Related Keywords>: L</cookie>, L</cookies>

=head1 Application Configuration Keywords

=head2 L<app|Dancer2::Manual/"Accessing the Application Object">

Returns an instance of the app. App is a L<Dancer2::Core::App>.

B<When to use>: When calling methods only available via the application object.

B<See also>: L</dancer_app>

=head2 L<config|Dancer2::Manual/config>

Retrieves the entire application configuration as a hash reference.

B<When to use>: Access or inspect all configuration settings.

B<Related Keywords>: L</set>, L</setting>

=head2 C<dancer_app>

Alias for L</app>.

B<Best Practice>: Use L</app> instead.

B<Related Keywords>: L</app>

=head2 L<dancer_version|Dancer2::Manual/dancer_version>

Retrieve full version number of installed Dancer2.

B<When to use>: To help manage compatability and feature usage in your
applications.

B<See also>: L</dancer_major_version>

=head2 L<dancer_major_version|Dancer2::Manual/dancer_major_version>

Retrieves major version number of Dancer2.

B<When to use>: To help manage compatability and feature usage in your
applications.

B<See also>: L</dancer_version>

=head2 L<prepare_app|Dancer2::Manual/prepare_app>

Function to help initialize and configure your Dancer2 app.

B<When to use>: When you need to run initialization or setup code once at
the start of your application.

B<See also>: L</to_app>

=head2 C<runner>

Provides access to the Dancer2 runner object, which manages the application's execution.

B<When to use>: Control or inspect the application's runtime environment.

B<Related Keywords>: L</app>, L</config>

=head2 L<set|Dancer2::Manual/set>

Sets a configuration value for the application.

B<When to use>: Change configuration dynamically at runtime.

B<Related Keywords>: L</setting>, L</config>

=head2 L<setting|Dancer2::Manual/setting>

Retrieves a configuration value.

B<When to use>: Access app configuration values.

B<Related Keywords>: L</set>, L</config>

=head2 C<start>

Initiates the Dancer2 application; typically called internally.

B<When to use>: Rarely used directly; see L</to_app> instead.

B<Related Keywords>: L</dance>, L</psgi_app>

=head2 L<var|Dancer2::Manual/var>

Sets a variable in the application context.

B<When to use>: Store temporary data accessible in routes and templates.

B<Related Keywords>: L</vars>

=head2 L<vars|Dancer2::Manual/vars>

Retrieves the application context variables.

B<When to use>: Access data stored with L</var>.

B<Related Keywords>: L</var>

=head1 Hooks

=head2 L<hook|Dancer2::Manual/Hooks>

Declares a hook to run custom code at specific stages in the request/response lifecycle.

B<When to use>: Modify requests or responses, or perform actions at predefined lifecycle points.

B<Related Keywords>: L</var>, L</vars>

=head1 Template Keywords

=head2 L<template|Dancer2::Manual/template>

Renders a view with the provided data.

B<When to use>: Generate HTML or other formats dynamically.

B<Related Keywords>: L</vars>

=head1 Logging Keywords

=head2 L<debug|Dancer2::Manual/debug>

Logs a message at the debug level.

B<When to use>: Detailed debugging and diagnostic messages.

B<Best Practice>: Use appropriate logging levels to maintain clear and actionable logs.

B<Related Keywords>: L</info>, L</warning>, L</error>, L</log>

=head2 L<error|Dancer2::Manual/error>

Logs a message at the error level.

B<When to use>: Log errors that need immediate attention.

B<Best Practice>: Use appropriate logging levels to maintain clear and actionable logs.

B<Related Keywords>: L</debug>, L</info>, L</warning>, L</log>

=head2 L<info|Dancer2::Manual/info>

Logs a message at the info level.

B<When to use>: General informational messages.

B<Best Practice>: Use appropriate logging levels to maintain clear and actionable logs.

B<Related Keywords>: L</debug>, L</warning>, L</error>, L</log>

=head2 L<log|Dancer2::Manual/log>

Logs a message at a specified level.

B<When to use>: Log messages with custom or dynamic levels.

B<Related Keywords>: L</debug>, L</info>, L</warning>, L</error>

=head2 L<logger|Dancer2::Manual/Logging>

Provides access to the logger object.

B<When to use>: Advanced logging scenarios.

B<Related Keywords>: L</log>, L</debug>, L</info>, L</warning>, L</error>

=head2 L<warning|Dancer2::Manual/warning>

Logs a message at the warning level.

B<When to use>: Logging non-critical issues that may need attention.

B<Best Practice>: Use appropriate logging levels to maintain clear and actionable logs.

B<Related Keywords>: L</debug>, L</info>, L</error>, L</log>

=head1 Miscellaneous Keywords

=head2 dance

Alias to the L<start> keyword.

B<Note>: This keyword has been superseded by L</to_app>.

B<Best Practice>: Use L</to_app> instead.

B<Related Keywords>: L</to_app>

=head2 dirname

Given a path, return the directory name.

B<When to use>: When you need to extract the directory name given a path.

B<See also>: L</path>

=head2 dsl

Provides access to the DSL (Domain Specific Language) object.

B<When to use>: When writing plugins or extending Dancer2's capabilities.

B<Related Keywords>: None.

=head2 engine

Given a namespace, return the current engine object. For example:

    my $template_engine = engine 'template';

B<When to use>: When you need to manually interact with one of the
underlying engines in Dancer2.

B<See also>: L</template>, L</session>, L</logger>

=head2 C<false>

Returns a false value.

B<When to use>: Explicitly return a false value in your application.

B<Related Keywords>: L</true>

=head2 mime

Provide access to your application's instance of L<Dancer2::Core::MIME>.

B<When to use>: When querying or changing your application's MIME settings.

B<See also>: L</send_file>

=head2 path

Concatenates multiple paths together without worrying about the underlying
operating system. It cleans the path aesthetically, but does not verify its
existence.

B<When to use>: When you need to generate a filesystem path within your
application.

B<See also>: L</dirname>

=head2 psgi_app

Provides the same functionality as L</to_app>, but uses the deprecated
Dispatcher engine.

B<Note>: This keyword has been superseded by L</to_app>.

B<Best Practice>: Use L</to_app> instead.

B<See also>: L<to_app|#to_app>.

=head2 L<to_app|Dancer2::Manual/to_app>

Returns the PSGI application code reference for the current Dancer2 app.

B<When to use>: Integrate the Dancer2 application with other PSGI-compatible frameworks or servers.

B<Related Keywords>: L</psgi_app>, L</dance>

=head2 C<true>

Returns a true value.

B<When to use>: Explicitly return a true value in your application.

B<Related Keywords>: L</false>

=head1 AUTHOR

Dancer Core Developers

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by Alexis Sukrieh.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut