Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/1.3001'

  • Loading branch information...
commit 36ea7e8a5e37620fbfc2184ac7273e3b01974331 2 parents 9455e2d + 7b6d9ed
Alexis Sukrieh authored
Showing with 1,263 additions and 1,037 deletions.
  1. +729 −691 CHANGES
  2. +1 −1  MANIFEST
  3. +47 −6 lib/Dancer.pm
  4. +10 −17 lib/Dancer/Config.pm
  5. +20 −3 lib/Dancer/Cookie.pm
  6. +10 −3 lib/Dancer/Cookies.pm
  7. +137 −79 lib/Dancer/Development.pod
  8. +1 −4 lib/Dancer/Handler/PSGI.pm
  9. +16 −0 lib/Dancer/Introduction.pod
  10. +108 −0 lib/Dancer/MIME.pm
  11. +0 −5 lib/Dancer/Plugin.pm
  12. +23 −2 lib/Dancer/Plugins.pod
  13. +4 −16 lib/Dancer/Renderer.pm
  14. +1 −1  lib/Dancer/Request.pm
  15. +3 −1 lib/Dancer/Response.pm
  16. +7 −5 lib/Dancer/Route.pm
  17. +8 −1 lib/Dancer/Session/YAML.pm
  18. +1 −2  lib/Dancer/Test.pm
  19. +6 −1 lib/Dancer/Tutorial.pod
  20. +0 −135 lib/Dancer/Tutorial/WebSockets.pod
  21. +4 −12 t/00_base/dancer_test.t
  22. +13 −6 t/01_config/02_mime_type.t
  23. +21 −5 t/03_route_handler/01_params.t
  24. +9 −1 t/03_route_handler/04_wildcards.t
  25. +5 −12 t/03_route_handler/06_regexp.t
  26. +4 −2 t/04_static_file/002_mime_types.t
  27. +15 −2 t/06_helpers/03_content_type.t
  28. +2 −9 t/07_apphandlers/05_middlewares.t
  29. +11 −1 t/09_cookies/02_cookie_object.t
  30. +1 −1  t/09_cookies/04_has_changed.t
  31. +38 −6 t/09_cookies/05_api.t
  32. +7 −1 t/11_logger/05_format.t
  33. +1 −6 t/15_plugins/03_namespace.t
View
1,420 CHANGES
@@ -1,875 +1,913 @@
+Dancer 1.3001
+
+ [ Flavio Poletti ]
+ * Added "git fetch upstream" for remote tracking
+ * turned a tab into the right number of spaces
+ * Fix weird Plack error "status code needs to be an integer greater than
+ or equal to 100", because of a typo in a call to Dancer::Error
+ (Closes issue GH#264)
+
+ [ Franck Cuny ]
+ * uri_(un)escape cookie value; closes GH-248
+ * remove websocket tutorial (it has its own distro now)
+ * add a new tests to make sure unknown templates produce a warning
+ * path for send_file must be relative from the public directory
+ * Support for complex values in cookies (scalars, flat arrays and
+ flat hashes). Fixes issue GH#249
+
+ [ David Precious ]
+ * Point people towards D::P::Database in the tutorial.
+ * Mention leaving ratings on cpanratings.
+ * Some minor typo fixed in the documentations.
+
+ [ mokko ]
+ * typos and a little more substatial changes to Development.pod
+
+ [ Hagen Fuchs ]
+ * Request.pm Decode HTTP::Request's uploads
+
+ [ Alberto Simoes ]
+ * Support for aliases for content_type and refactoring of
+ mime-types handling, with a new class Dancer::MIME
+ (closes issue GH #124)
+ * Deprecation of Dancer::Config::mime_types (now handled by Dancer::MIME).
+
+ [ jahmed ]
+ * Fix a bug in YAML session backend, during the creation of the session
+ file.
+
Dancer 1.3000_02
- [ Sawyer X ]
- * Added forward() functionality (incl. tests and docs)
+ [ Sawyer X ]
+ * Added forward() functionality (incl. tests and docs)
- [ Damien Krotkine ]
- * FIX for --no-check switch in script/dancer
- * Refactoring of Dancer::Template::Abstract
- - add support of apply_layout and apply_renderer
- - deprecation of render_with_layout (now handled better)
- - add an accessor "engine" to the DSL to access any engine singleton
- - better interface for Dancer::Object and Dancer::Object::Singleton
- - updated tests accordingly
+ [ Damien Krotkine ]
+ * FIX for --no-check switch in script/dancer
+ * Refactoring of Dancer::Template::Abstract
+ - add support of apply_layout and apply_renderer
+ - deprecation of render_with_layout (now handled better)
+ - add an accessor "engine" to the DSL to access any engine singleton
+ - better interface for Dancer::Object and Dancer::Object::Singleton
+ - updated tests accordingly
- [ Jonathan Otsuka ]
- * Bring dancer application creation pod up-to-date 1.2003
+ [ Jonathan Otsuka ]
+ * Bring dancer application creation pod up-to-date 1.2003
Dancer 1.3000_01
- [ Damien Krotkine ]
- * Better check of keywords used in plugins.
- * internal refactoring:
- - Dancer::Object::Singleton added to refactor engines later
- - Support of inheritance in attributes declared with Dancer::Object
+ [ Damien Krotkine ]
+ * Better check of keywords used in plugins.
+ * internal refactoring:
+ - Dancer::Object::Singleton added to refactor engines later
+ - Support of inheritance in attributes declared with Dancer::Object
- [ jamhed ]
- * Fix some unicode issues, refactored all file openings in one function in
- Dancer::FileUtils.
+ [ jamhed ]
+ * Fix some unicode issues, refactored all file openings in one function in
+ Dancer::FileUtils.
- [ Gabor Szabo ]
- * Adding test for multi-leveled scaffolding.
+ [ Gabor Szabo ]
+ * Adding test for multi-leveled scaffolding.
- [ Maurice Mengel (mokko) ]
- * Skip file upload tests on Cygwin, not just win32.
+ [ Maurice Mengel (mokko) ]
+ * Skip file upload tests on Cygwin, not just win32.
- [ Alan Haggai ]
- * Fixing up typos in various places.
- * Show the correct filename in usage.
+ [ Alan Haggai ]
+ * Fixing up typos in various places.
+ * Show the correct filename in usage.
- [ Alexis Sukrieh ]
- * Update documentation for developers. Dancer::Development reflects the new
- releases startegy since 1.2 is out. Also better explaining about how
- to contribute pull-requests to the core team.
- * New documentation for integrators: Dancer::Development::Integration
- describes precisely how integrators should handle pull-requests.
+ [ Alexis Sukrieh ]
+ * Update documentation for developers. Dancer::Development reflects the new
+ releases startegy since 1.2 is out. Also better explaining about how
+ to contribute pull-requests to the core team.
+ * New documentation for integrators: Dancer::Development::Integration
+ describes precisely how integrators should handle pull-requests.
- [ Naveen ]
- * add a --no-check switch to script/dancer to disable remote check of new
- Dancer versions.
+ [ Naveen ]
+ * add a --no-check switch to script/dancer to disable remote check of new
+ Dancer versions.
- [ Philippe Bruhat ]
- * add script/wallflower, helper to turn a Dancer application into a static
- web site.
- * better behaviour for plugin_setting (better search, more user-friendly)
+ [ Philippe Bruhat ]
+ * add script/wallflower, helper to turn a Dancer application into a static
+ web site.
+ * better behaviour for plugin_setting (better search, more user-friendly)
- [ Franck Cuny ]
- * Support for configurable log format in logger engines
- * Refactoring of Dancer::Route, some optimisations and code cleanup
- * Add several tests to increase the coverage (reached 92.4%, for 1399 tests)
+ [ Franck Cuny ]
+ * Support for configurable log format in logger engines
+ * Refactoring of Dancer::Route, some optimisations and code cleanup
+ * Add several tests to increase the coverage (reached 92.4%, for 1399 tests)
Dancer 1.2003
- * Production release.
+ * Production release.
Dancer 1.2002_02
- [ Danijel Tasov ]
- * Correct HTTP.pm POD's 503 entry with 403.
+ [ Danijel Tasov ]
+ * Correct HTTP.pm POD's 503 entry with 403.
- [ Paul Tomlin ]
- * Tests for URI object in uri_for.
- * Update Plack middleware tests compatibility.
+ [ Paul Tomlin ]
+ * Tests for URI object in uri_for.
+ * Update Plack middleware tests compatibility.
Dancer 1.2002_01
- [ Joel Roth ]
- * Code fixes in documentation (Dancer::Session, Dancer::Introduction).
+ [ Joel Roth ]
+ * Code fixes in documentation (Dancer::Session, Dancer::Introduction).
- [ Franck Cuny ]
- * Fix test failures on old machines with Test::More without done_testing.
+ [ Franck Cuny ]
+ * Fix test failures on old machines with Test::More without done_testing.
Dancer 1.2002
- * Productionized! :)
+ * Productionized! :)
Dancer 1.2001_01
- [ David Precious, Ivan Bessarabov ]
- * Fixing TT example config.
+ [ David Precious, Ivan Bessarabov ]
+ * Fixing TT example config.
- [ Danijel Tasov ]
- * Default layout now validates.
+ [ Danijel Tasov ]
+ * Default layout now validates.
Dancer 1.2001
- [ Sawyer X ]
- * Fix clash with KiokuDB because of Dancer::Serializer::Dumper.
+ [ Sawyer X ]
+ * Fix clash with KiokuDB because of Dancer::Serializer::Dumper.
- [ Franck Cuny ]
- * Refactoring engine triggers. This resolves an issue of engine inits being
- run before all configuration is read. That also crashes D::S::Cookie.
- As a side effect we now have a refactored _set_setting() which does not
- trigger any engine hooks (unlike setting()).
- * Fix failing test t/07_apphandlers/06_debug.t
+ [ Franck Cuny ]
+ * Refactoring engine triggers. This resolves an issue of engine inits being
+ run before all configuration is read. That also crashes D::S::Cookie.
+ As a side effect we now have a refactored _set_setting() which does not
+ trigger any engine hooks (unlike setting()).
+ * Fix failing test t/07_apphandlers/06_debug.t
- [ David Precious ]
- * Doc fixes. Clarifications to Cookbook's REST section.
- * Don't crash if application name is invalid and provide better information.
+ [ David Precious ]
+ * Doc fixes. Clarifications to Cookbook's REST section.
+ * Don't crash if application name is invalid and provide better information.
Dancer 1.2000
- ** 1.2 is a stable release of Dancer **
- ** We assure consistency and stability for this release and the following **
- ** 1.2xxx releases; you should not have issues updating to any 1.2xxx **
- ** version because of it. **
+ ** 1.2 is a stable release of Dancer **
+ ** We assure consistency and stability for this release and the following **
+ ** 1.2xxx releases; you should not have issues updating to any 1.2xxx **
+ ** version because of it. **
- ++ A very special thanks goes to the Dancer community who improved and ++
- ++ perfected this release and worked hard on reporting bugs, fixing them, ++
- ++ improving the stability, providing important features and everything ++
- ++ else which makes Dancer so attractive - and above all: its community ++
- ++ so thank you! ++
+ ++ A very special thanks goes to the Dancer community who improved and ++
+ ++ perfected this release and worked hard on reporting bugs, fixing them, ++
+ ++ improving the stability, providing important features and everything ++
+ ++ else which makes Dancer so attractive - and above all: its community ++
+ ++ so thank you! ++
- [ Sawyer X ]
- * Fixing some more XML tests with missing preqreqs.
+ [ Sawyer X ]
+ * Fixing some more XML tests with missing preqreqs.
Dancer 1.1999_04 (RC4)
- [ Sawyer X ]
- * Load Plack::Loader dynamically in test.
+ [ Sawyer X ]
+ * Load Plack::Loader dynamically in test.
- [ Yanick Champoux ]
- * Doc fix.
+ [ Yanick Champoux ]
+ * Doc fix.
Dancer 1.1999_03 (RC3)
- [ Alexis Sukrieh ]
- * Transparent unicode support
- Dancer now takes care transparently of decoding unicode strings
- used within route handlers and encoding them back before sending
- a response content. Once the 'charset' setting is set, the user
- has nothing more to do to have a working unicode-aware application.
- * FIX for issue #172
- More documentation added to Dancer::Request, all public method
- are documented. A pod coverage test has been added for this
- module.
- * Documentation update The deployment documentation is more precise about
- cgi/fast-cgi deployment under Apache.
- * FIX for issue GH#171
- Scaffolded configuration files are fully commented in order to quickly
- guide the user in her first steps.
-
- [ Damien Krotkine ]
- * Fix Dancer::Plugin OO issue
-
- [ Danijel Tasov ]
- * Fixed expires in cookies + tests
-
- [ Philippe Bruhat ]
- * Dancer::Logger::Abstract: turn _should() into a closure, and avoid
- setting up the hash again and agai
-
- [ Franck Cuny ]
- * Closes issue 181 (unknown log level)
- * Plack middlewares must be listed in an arrayref (listing them in a
- hashref is now deprecated)
-
- [ Al Newkirk ]
- * fixed redirect to redirect immediately (+ refactoring by franck)
-
- [ Dave Doyle ]
- * clarify Pod as to how before_template works
-
- [ Sawyer X ]
- * Overhaul tests to use lib t/lib instead of t::lib::.
- (fixes Windows test fails)
- * PSGI envs on Windows is in capital letters.
- (fixes Windows test fails)
- * Add tests on every required directory to create a fake environment.
- (realpath() on Windows fails when path doesn't exist)
+ [ Alexis Sukrieh ]
+ * Transparent unicode support
+ Dancer now takes care transparently of decoding unicode strings
+ used within route handlers and encoding them back before sending
+ a response content. Once the 'charset' setting is set, the user
+ has nothing more to do to have a working unicode-aware application.
+ * FIX for issue #172
+ More documentation added to Dancer::Request, all public method
+ are documented. A pod coverage test has been added for this
+ module.
+ * Documentation update The deployment documentation is more precise about
+ cgi/fast-cgi deployment under Apache.
+ * FIX for issue GH#171
+ Scaffolded configuration files are fully commented in order to quickly
+ guide the user in her first steps.
+
+ [ Damien Krotkine ]
+ * Fix Dancer::Plugin OO issue
+
+ [ Danijel Tasov ]
+ * Fixed expires in cookies + tests
+
+ [ Philippe Bruhat ]
+ * Dancer::Logger::Abstract: turn _should() into a closure, and avoid
+ setting up the hash again and agai
+
+ [ Franck Cuny ]
+ * Closes issue 181 (unknown log level)
+ * Plack middlewares must be listed in an arrayref (listing them in a
+ hashref is now deprecated)
+
+ [ Al Newkirk ]
+ * fixed redirect to redirect immediately (+ refactoring by franck)
+
+ [ Dave Doyle ]
+ * clarify Pod as to how before_template works
+
+ [ Sawyer X ]
+ * Overhaul tests to use lib t/lib instead of t::lib::.
+ (fixes Windows test fails)
+ * PSGI envs on Windows is in capital letters.
+ (fixes Windows test fails)
+ * Add tests on every required directory to create a fake environment.
+ (realpath() on Windows fails when path doesn't exist)
Dancer 1.1999_02 (RC2)
- [ Mark Allen ]
- * Add a tutorial (Dancer::Tutorial)
- * example application 'Dancr', provided in example/
-
- [ Franck Cuny ]
- * Dancer::Test load D::Session::Simple
- * rewrite how Dancer handle HTTP headers
- - no more Dancer::Headers
- - all headers are HTTP::Headers object
-
- [ Philippe Bruhat ]
- * use Pod::Usage
-
- [ Damien Krotkine ]
- * replace all die and warn with croak and carp
-
- [ Alexis Sukrieh ]
- * FIX for issue GH #151
- utf8 pragma is imported automatically when Dancer is loaded
- to allow the usage of UTF-8 strings in the application code.
- (Thanks to kocoureasy for the report).
- * FIX for "UTF-8" issues (GH#153):
- - response content is encoded only if content_type is text
- - charset setting is normalized to UTF-8 when appropriate
- - automatically decode UTF-8 strings in params
- * FIX scaffolded dispatchers (script/dancer)
- The PLACK_ENV variable is not propagated by Apoache to the dispatchers (at
- least with our Deployment examples) so the dispatchers aren't aware of the
- PSGI context if we don't tell them explicitly.
- This patch forces the dispatchers in PSGI mode.
- * FIX (unknown bug)
- When a serializer is set and show_errors is true, don't expose internal
- errors caught.
-
- [ Naveen ]
- * add --version to the dancer CLI
- * changed the URI fetched by the dancer script to check Dancer's version
+ [ Mark Allen ]
+ * Add a tutorial (Dancer::Tutorial)
+ * example application 'Dancr', provided in example/
+
+ [ Franck Cuny ]
+ * Dancer::Test load D::Session::Simple
+ * rewrite how Dancer handle HTTP headers
+ - no more Dancer::Headers
+ - all headers are HTTP::Headers object
+
+ [ Philippe Bruhat ]
+ * use Pod::Usage
+
+ [ Damien Krotkine ]
+ * replace all die and warn with croak and carp
+
+ [ Alexis Sukrieh ]
+ * FIX for issue GH #151
+ utf8 pragma is imported automatically when Dancer is loaded
+ to allow the usage of UTF-8 strings in the application code.
+ (Thanks to kocoureasy for the report).
+ * FIX for "UTF-8" issues (GH#153):
+ - response content is encoded only if content_type is text
+ - charset setting is normalized to UTF-8 when appropriate
+ - automatically decode UTF-8 strings in params
+ * FIX scaffolded dispatchers (script/dancer)
+ The PLACK_ENV variable is not propagated by Apoache to the dispatchers (at
+ least with our Deployment examples) so the dispatchers aren't aware of the
+ PSGI context if we don't tell them explicitly.
+ This patch forces the dispatchers in PSGI mode.
+ * FIX (unknown bug)
+ When a serializer is set and show_errors is true, don't expose internal
+ errors caught.
+
+ [ Naveen ]
+ * add --version to the dancer CLI
+ * changed the URI fetched by the dancer script to check Dancer's version
Dancer 1.1999_01 (RC1)
- [ Alexis Sukrieh ]
- * FIX for utf8 content in views
- Dancer now handles correctly templates with non-ASCII characters in views.
- All you have to do is to set the "charset" setting in your config. Your
- content response will then be encoded appropriately on-the-fly by Dancer.
- * Scaffolded app sets the charset to "utf8" by default.
- * Better design for the scaffolded app (logo, favicon and background image
- added)
- * Environment info available on scaffolded app
- * LWP is used by the dancer helper to download files
- * jQuery 1.4.2 (minified) is included in the scaffolded app
- * default layout uses <% request.base %> in order to support mounted apps
- (Thanks to Naveed Massjouni and Franck Cuny for the concept/idea).
- * The main.tt layout sources jQuery first from Google CDN and falls back to
- the local minified version if on offline mode.
- * New default token provided to the "template" helper: dancer_version
-
- [ Sebastian de Castelberg ]
- * The dancer helper is able to download files via a transparent proxy
- (thanks to LWP).
-
- [ Adam J. Foxson ]
- * FIX for issue GH#136:
- "readline() on closed filehandle DATA" error that appears when running
- the app with Starman
-
- [ Naveed Massjouni ]
- * Dancer::Test function get_response is renamed to dancer_response
- get_response still works but is deprecated
- * dispatch.f?cgi scripts use FindBin to resolve their location.
- FIX a bug when using symlinks.
-
- [ Franck Cuny ]
- * FIX for issue GH#129
- don't add multiple content-type to headers
- * fix broken tests (they were testing incorrect content type)
-
- [ Damien Krotkine ]
- * FIX for issue GH#115
- documentation about compression in Dancer::Deployment
-
- [ David Precious ]
- * Make the 'layout' param to the template keyword work as you'd expect and
- allow you to set a custom layout to use, e.g.:
- template 'templatename', {}, { layout => 'layoutname' };
-
- [ Philippe Bruhat ]
- * Make sure a plugin refuse to register a keyword twice
-
- [ Sawyer X ]
- * Lots of documentation updates
- * Dancer now logs caught crashes in rendering
- (easier to debug Ajax routes)
+ [ Alexis Sukrieh ]
+ * FIX for utf8 content in views
+ Dancer now handles correctly templates with non-ASCII characters in views.
+ All you have to do is to set the "charset" setting in your config. Your
+ content response will then be encoded appropriately on-the-fly by Dancer.
+ * Scaffolded app sets the charset to "utf8" by default.
+ * Better design for the scaffolded app (logo, favicon and background image
+ added)
+ * Environment info available on scaffolded app
+ * LWP is used by the dancer helper to download files
+ * jQuery 1.4.2 (minified) is included in the scaffolded app
+ * default layout uses <% request.base %> in order to support mounted apps
+ (Thanks to Naveed Massjouni and Franck Cuny for the concept/idea).
+ * The main.tt layout sources jQuery first from Google CDN and falls back to
+ the local minified version if on offline mode.
+ * New default token provided to the "template" helper: dancer_version
+
+ [ Sebastian de Castelberg ]
+ * The dancer helper is able to download files via a transparent proxy
+ (thanks to LWP).
+
+ [ Adam J. Foxson ]
+ * FIX for issue GH#136:
+ "readline() on closed filehandle DATA" error that appears when running
+ the app with Starman
+
+ [ Naveed Massjouni ]
+ * Dancer::Test function get_response is renamed to dancer_response
+ get_response still works but is deprecated
+ * dispatch.f?cgi scripts use FindBin to resolve their location.
+ FIX a bug when using symlinks.
+
+ [ Franck Cuny ]
+ * FIX for issue GH#129
+ don't add multiple content-type to headers
+ * fix broken tests (they were testing incorrect content type)
+
+ [ Damien Krotkine ]
+ * FIX for issue GH#115
+ documentation about compression in Dancer::Deployment
+
+ [ David Precious ]
+ * Make the 'layout' param to the template keyword work as you'd expect and
+ allow you to set a custom layout to use, e.g.:
+ template 'templatename', {}, { layout => 'layoutname' };
+
+ [ Philippe Bruhat ]
+ * Make sure a plugin refuse to register a keyword twice
+
+ [ Sawyer X ]
+ * Lots of documentation updates
+ * Dancer now logs caught crashes in rendering
+ (easier to debug Ajax routes)
Dancer 1.1904
- [ Sawyer X, Franck Cuny ]
- * SAX, not Sax.
- * Check for XML::Parser or XML::SAX in test as well.
+ [ Sawyer X, Franck Cuny ]
+ * SAX, not Sax.
+ * Check for XML::Parser or XML::SAX in test as well.
Dancer 1.1903
- [ Sawyer X, Franck Cuny ]
- * XML::Simple needs either XML::SAX or XML::Parser.
- (fixed test fails from Dancer::Serializer::XML)
+ [ Sawyer X, Franck Cuny ]
+ * XML::Simple needs either XML::SAX or XML::Parser.
+ (fixed test fails from Dancer::Serializer::XML)
Dancer 1.1902
- [ Adam J. Foxson ]
- * Addresses issue #136: "readline() on closed filehandle DATA"
+ [ Adam J. Foxson ]
+ * Addresses issue #136: "readline() on closed filehandle DATA"
Dancer 1.1901 (1.2RC0)
- [ Franck Cuny ]
- * implemented GH#120:
- - methods {to,from}_{xml,json,yaml} accept more than one arguments. The
- first argument is the data to transform. All the remainings arguments
- are parameters to alter the behavior of the serializers. Refer to the
- documentation for more informations.
- * more tests added
-
- [ Alexis Sukrieh ]
- * load_plugin is DEPRECATED; 'use' should be used instead to load a plugin.
- This is fixes the major issue with plugins about symbol exports that
- didn't work well (issue #101).
- * All paths built in a scaffolded application are dynamic, it's now
- possible to move a scaffolded application after it's been generated.
- (fixes issues #88,
- * The auto_reload feature is now disabled by default due to too many
- unsolved issues (it works most of the time, but some race conditions are
- still present) This feature is still being working on, but it's now
- flagged "experimental").
- * Default log level in development environment is now 'core' in order to
- provide more information.
- * New scaffolded application design. More neutral and with lots of
- information for a beginner, and links to useful material.
- Based on the Ruby on Rails start page (kudos to the Rails team,
- http://www.rubyonrails.org).
-
- [ Boris Shomodjvarac ]
- * Support for a clean way for Template engines to define their template
- file extensions (issue #126).
+ [ Franck Cuny ]
+ * implemented GH#120:
+ - methods {to,from}_{xml,json,yaml} accept more than one arguments. The
+ first argument is the data to transform. All the remainings arguments
+ are parameters to alter the behavior of the serializers. Refer to the
+ documentation for more informations.
+ * more tests added
+
+ [ Alexis Sukrieh ]
+ * load_plugin is DEPRECATED; 'use' should be used instead to load a plugin.
+ This is fixes the major issue with plugins about symbol exports that
+ didn't work well (issue #101).
+ * All paths built in a scaffolded application are dynamic, it's now
+ possible to move a scaffolded application after it's been generated.
+ (fixes issues #88,
+ * The auto_reload feature is now disabled by default due to too many
+ unsolved issues (it works most of the time, but some race conditions are
+ still present) This feature is still being working on, but it's now
+ flagged "experimental").
+ * Default log level in development environment is now 'core' in order to
+ provide more information.
+ * New scaffolded application design. More neutral and with lots of
+ information for a beginner, and links to useful material.
+ Based on the Ruby on Rails start page (kudos to the Rails team,
+ http://www.rubyonrails.org).
+
+ [ Boris Shomodjvarac ]
+ * Support for a clean way for Template engines to define their template
+ file extensions (issue #126).
Dancer 1.1812
- [ Franck Cuny ]
- * Skip bogus uploads test on Win32 (thanks to Alias for reporting)
+ [ Franck Cuny ]
+ * Skip bogus uploads test on Win32 (thanks to Alias for reporting)
- [ Alexis Sukrieh ]
- * Fix for scaffolded apps
- * Dancer::Deployment cleanup (CGI section)
- * Declare LWP explicitly (already implied by HTTP::Body and HTTP::Headers)
+ [ Alexis Sukrieh ]
+ * Fix for scaffolded apps
+ * Dancer::Deployment cleanup (CGI section)
+ * Declare LWP explicitly (already implied by HTTP::Body and HTTP::Headers)
- [ Sawyer X ]
- * Nitpicking at tabs and spaces at end of lines
+ [ Sawyer X ]
+ * Nitpicking at tabs and spaces at end of lines
Dancer 1.1811
- [ Franck Cuny ]
- * FIX for issue #113 and #112
+ [ Franck Cuny ]
+ * FIX for issue #113 and #112
- [ Naveed Massjouni ]
- * FIX for issues #111 and #108
+ [ Naveed Massjouni ]
+ * FIX for issues #111 and #108
Dancer 1.1810
- [ Naveed Massjouni ]
- * FIX for issue #108
- replaced Clone::clone() with Storable::dclone().
- * Fixed the plan of one of the test files.
+ [ Naveed Massjouni ]
+ * FIX for issue #108
+ replaced Clone::clone() with Storable::dclone().
+ * Fixed the plan of one of the test files.
- [ Alexis Sukrieh ]
- * Fix a test that depends on YAML (pass if not present)
- (Smoker failure '2010-08-30T11:07:59Z').
+ [ Alexis Sukrieh ]
+ * Fix a test that depends on YAML (pass if not present)
+ (Smoker failure '2010-08-30T11:07:59Z').
Dancer 1.1809
- [ Franck Cuny ]
- * update Deployement.pod and Cookbook.pod
- * fix bug in route building with prefix
- * don't use app.psgi anymore in generated scripts
- * fix GH#106: serializer
- * fix bug in PSGI handler using HTTP::Headers when using some header
- * fix bug in ajax query
- * more tests
+ [ Franck Cuny ]
+ * update Deployement.pod and Cookbook.pod
+ * fix bug in route building with prefix
+ * don't use app.psgi anymore in generated scripts
+ * fix GH#106: serializer
+ * fix bug in PSGI handler using HTTP::Headers when using some header
+ * fix bug in ajax query
+ * more tests
- [ Alexis Sukrieh ]
- * fix plan for t/03_route_handler/24_named_captures.t
+ [ Alexis Sukrieh ]
+ * fix plan for t/03_route_handler/24_named_captures.t
Dancer 1.1808
- [ Alexis Sukrieh ]
- * FIX test failures
- - t/08_session/07_session_expires.t
- - t/08_session/07_session_expires.t
+ [ Alexis Sukrieh ]
+ * FIX test failures
+ - t/08_session/07_session_expires.t
+ - t/08_session/07_session_expires.t
Dancer 1.1807
- [ Sawyer X ]
- * Fix for RT #60403: removing Test::Exception requirement
-
- [ Alexis Sukrieh ]
- * Global rewrite of Dancer's core to allow support for
- sub-application, better route resolution and a better design.
- * Support for mountable applications via "load_app".
- Mounted applications can have their own settings registry and
- can be mounted under a given prefix.
-
- [ Franck Cuny ]
- * Support for new hooks:
- - after: to allow response post-processing
- - before_template: to allow defaut tokens to be given at anytime
- to the template function.
- * Fix and test for bug RT#57829
- (Custom response headers lost when using JSON serializer)
- * FIX PSGI compatibility layer (request->path_info is used when appropriate
- instead of request->path)
- * FIX for GH#100
- When loading a module, it's possible to require a minimal
- version.
- * New option "ajax" for route handlers.
- * Fix a bug in ajax route when processing the route resolution
- (when a route is defined with options, it's pushed in the
- beggining of the route handler tree).
-
- [ jamhed ]
- * Support for new setting "session_expire" in order to allow
- session cookies to expire before the browser is closed.
-
- [ Naveed Massjouni ]
- * Dancer::Test can now test requests with a body
+ [ Sawyer X ]
+ * Fix for RT #60403: removing Test::Exception requirement
+
+ [ Alexis Sukrieh ]
+ * Global rewrite of Dancer's core to allow support for
+ sub-application, better route resolution and a better design.
+ * Support for mountable applications via "load_app".
+ Mounted applications can have their own settings registry and
+ can be mounted under a given prefix.
+
+ [ Franck Cuny ]
+ * Support for new hooks:
+ - after: to allow response post-processing
+ - before_template: to allow defaut tokens to be given at anytime
+ to the template function.
+ * Fix and test for bug RT#57829
+ (Custom response headers lost when using JSON serializer)
+ * FIX PSGI compatibility layer (request->path_info is used when appropriate
+ instead of request->path)
+ * FIX for GH#100
+ When loading a module, it's possible to require a minimal
+ version.
+ * New option "ajax" for route handlers.
+ * Fix a bug in ajax route when processing the route resolution
+ (when a route is defined with options, it's pushed in the
+ beggining of the route handler tree).
+
+ [ jamhed ]
+ * Support for new setting "session_expire" in order to allow
+ session cookies to expire before the browser is closed.
+
+ [ Naveed Massjouni ]
+ * Dancer::Test can now test requests with a body
Dancer 1.1806_02
- [James Aitken]
- * fix issues GH #84 #86 and #87 (failing tests on < 5.10 due to regex with named captures)
+ [James Aitken]
+ * fix issues GH #84 #86 and #87 (failing tests on < 5.10 due to regex with named captures)
- [franck cuny]
- * update cookbook
+ [franck cuny]
+ * update cookbook
- [François Charlier]
- * fix for GH#76 and GH#88
+ [François Charlier]
+ * fix for GH#76 and GH#88
- [David Precious]
- * Add Dancer::Plugins POD, describing useful plugins
- * Extend sessions & logging in entry in cookbook
+ [David Precious]
+ * Add Dancer::Plugins POD, describing useful plugins
+ * Extend sessions & logging in entry in cookbook
Dancer 1.1806_01
- [ sebastian de castelberg ]
- * Support for path_info() in Dancer::Request so it's possible to
- mount an application under a directory.
-
- [ Alexis Sukrieh ]
- * Fix for RT#56239
- logger calls are better traced
- * Fix for GH#72
- New keyword 'load_plugin' for loading a plugin in the current namespace.
- Plugins can be used anywhere thanks to that method.
- * Fix for issue #77
- Passing and caching works well together again.
- * Applied miyagawa's patch for droping the app.psgi file. Refactoring of
- Dancer::Handler::PSGI and friends.
- * Applied LoonyPandora's patch for checking Dancer's VERSION when running
- script/dancer. Changed it a bit so it can check against CPAN rather than
- GitHub.
- * Documentation update: r('') is now DEPRECATED, the method triggers a warning
- when called and will be removed in the next stable release (1.2).
- * Transparent wrapping of Plack middlewares in Dancer's configuration.
- It's possible to enable/disable middlewares right from Dancer's config files.
- Thanks to Tatsuiko Miyagawa and Franck Cuny for their help.
-
- [jbarratt]
- * Dancer::Serializer::JSON supports 'allow_blessed' and 'convert_blessed'
- options.
-
- [ Marc Chantreux ]
- * Support for regexp objects in route definition
- * Support for named captures (keyword 'captures' added to Dancer's syntax).
+ [ sebastian de castelberg ]
+ * Support for path_info() in Dancer::Request so it's possible to
+ mount an application under a directory.
+
+ [ Alexis Sukrieh ]
+ * Fix for RT#56239
+ logger calls are better traced
+ * Fix for GH#72
+ New keyword 'load_plugin' for loading a plugin in the current namespace.
+ Plugins can be used anywhere thanks to that method.
+ * Fix for issue #77
+ Passing and caching works well together again.
+ * Applied miyagawa's patch for droping the app.psgi file. Refactoring of
+ Dancer::Handler::PSGI and friends.
+ * Applied LoonyPandora's patch for checking Dancer's VERSION when running
+ script/dancer. Changed it a bit so it can check against CPAN rather than
+ GitHub.
+ * Documentation update: r('') is now DEPRECATED, the method triggers a warning
+ when called and will be removed in the next stable release (1.2).
+ * Transparent wrapping of Plack middlewares in Dancer's configuration.
+ It's possible to enable/disable middlewares right from Dancer's config files.
+ Thanks to Tatsuiko Miyagawa and Franck Cuny for their help.
+
+ [jbarratt]
+ * Dancer::Serializer::JSON supports 'allow_blessed' and 'convert_blessed'
+ options.
+
+ [ Marc Chantreux ]
+ * Support for regexp objects in route definition
+ * Support for named captures (keyword 'captures' added to Dancer's syntax).
Dancer 1.1805
- [ Alexis Sukrieh ]
- * Fix for RT#56239
- logger calls are better traced
- * Fix for GH#72
- New keyword 'load_plugin' for loading a plugin in the current namespace.
- Plugins can be used anywhere thanks to that method.
+ [ Alexis Sukrieh ]
+ * Fix for RT#56239
+ logger calls are better traced
+ * Fix for GH#72
+ New keyword 'load_plugin' for loading a plugin in the current namespace.
+ Plugins can be used anywhere thanks to that method.
- [ Minty ]
- * Update Introduction pod with (required) -a dancer opt (Murray, 5 hours ago)
- * Bump HTTP::Body dependency to 1.07 (Murray, 6 hours ago)
+ [ Minty ]
+ * Update Introduction pod with (required) -a dancer opt (Murray, 5 hours ago)
+ * Bump HTTP::Body dependency to 1.07 (Murray, 6 hours ago)
Dancer 1.804
- [ sebastian de castelberg ]
- * Fix priority in D::S::Mutable.
+ [ sebastian de castelberg ]
+ * Fix priority in D::S::Mutable.
- [ David Precious ]
- * Fix test failures with old Plack versions (Issue 73).
- * Don't surround content with <p> tags in layout.
- * Add $ENV{REMOTE_ADDR} in core log messages
+ [ David Precious ]
+ * Fix test failures with old Plack versions (Issue 73).
+ * Don't surround content with <p> tags in layout.
+ * Add $ENV{REMOTE_ADDR} in core log messages
- [ SawyerX ]
- * Fix issue #75, reported by nanis.
- perl -MDancer -e "print $Dancer::VERSION" now works as expected
+ [ SawyerX ]
+ * Fix issue #75, reported by nanis.
+ perl -MDancer -e "print $Dancer::VERSION" now works as expected
- [ Daniel Pittman ]
- * FIX for issue #80
- Make sure the tempfiles created during uploads are removed when the
- request object dies.
+ [ Daniel Pittman ]
+ * FIX for issue #80
+ Make sure the tempfiles created during uploads are removed when the
+ request object dies.
- [ Alexis Sukrieh ]
- * FIX for bug RT#58355
- Rewrite of Dancer::Template::Simple's parser, now more robust,
- based on Perl's regexp engine.
- * FIX a warning when remote_address is undefined
+ [ Alexis Sukrieh ]
+ * FIX for bug RT#58355
+ Rewrite of Dancer::Template::Simple's parser, now more robust,
+ based on Perl's regexp engine.
+ * FIX a warning when remote_address is undefined
Dancer 1.1803
- [ Alexis Sukrieh ]
- * Fix for issue #69
- The issue was resolved in 1.1801, this time, the fix is working as
- expected.
+ [ Alexis Sukrieh ]
+ * Fix for issue #69
+ The issue was resolved in 1.1801, this time, the fix is working as
+ expected.
- [ Sawyer X ]
- * Fix for RT #57715, require Test::More 0.88 and up.
+ [ Sawyer X ]
+ * Fix for RT #57715, require Test::More 0.88 and up.
Dancer 1.1802
- [ Sawyer X ]
- * Fix RT #57158 (route_cache does not work with multiple parameters)
- Cache revealed a small design overlook of not cloning a route before
- returning it to the user, making multiple parameters disabled.
- (Thanks to Stéphane Alnet for reporting and adding a test for it!)
+ [ Sawyer X ]
+ * Fix RT #57158 (route_cache does not work with multiple parameters)
+ Cache revealed a small design overlook of not cloning a route before
+ returning it to the user, making multiple parameters disabled.
+ (Thanks to Stéphane Alnet for reporting and adding a test for it!)
Dancer 1.1801
- [ Alexis Sukrieh ]
- * FIX issue #69
- Error are trapped even if occuring from Dancer's source code.
- auto_reload is set to false in scaffolded applications to
- prevent errors if Module::Refresh is not installed.
+ [ Alexis Sukrieh ]
+ * FIX issue #69
+ Error are trapped even if occuring from Dancer's source code.
+ auto_reload is set to false in scaffolded applications to
+ prevent errors if Module::Refresh is not installed.
Dancer 1.1800
- [ Alexis Sukrieh ]
- * merge of the devel branch into master, first stable release of
- 1.178_01 and 1.178_02
+ [ Alexis Sukrieh ]
+ * merge of the devel branch into master, first stable release of
+ 1.178_01 and 1.178_02
Dancer 1.178_02
- [ Alexis Sukrieh ]
- * Errors are caught in before filters
- * halt can be given a Dancer::Response object rahter than plain text content
+ [ Alexis Sukrieh ]
+ * Errors are caught in before filters
+ * halt can be given a Dancer::Response object rahter than plain text content
Dancer 1.178_01
- [ Alexis Sukrieh ]
- * New logger for sending log message to STDERR: Dancer::Logger::Console
- Thanks to Gabor Szabo for the idea.
- * Logger engines don't have anymore to implement _format(), they can use
- $self->format_message instead.
- * New log level: "core" for letting Dancer's core express itself on crucial
- events.
- That way, when the app config sets log to "core", any core messages is
- sent to the logger, and the end-user can see which route is chosen for
- each request received.
- Thanks to Gabor Szabo for the idea.
- * New class Dancer::Timer added so any logger engine can now show a timer
- string.
- * Scaffolded applications are now built like a CPAN distribution, with a
- Makefile.PL
- and test scripts (thanks to Gabor Szabo for the idea).
- * Added Dancer::Test to provide helpers for writing test script for Dancer
- applications
- * FIX bug when returning a void context after redirecting a route.
- Thanks to Juan J. Martínez for the report.
- * Add support for request headers in Dancer::Request
- * Add support for halt() in Dancer's syntax.
-
- [ Alex Kapranof ]
- * Support for on-the-fly charset encoding when the setting is set and a
- content is sent by Dancer and needs to be encoded.
- The response Content-Type is updated accordingly as well.
-
- [ Sawyer X ]
- * Adding "import_warnings" settings. On by default, but allows to disable
- auto-import of "warnings" pragma. Reported by Adam Kennedy.
+ [ Alexis Sukrieh ]
+ * New logger for sending log message to STDERR: Dancer::Logger::Console
+ Thanks to Gabor Szabo for the idea.
+ * Logger engines don't have anymore to implement _format(), they can use
+ $self->format_message instead.
+ * New log level: "core" for letting Dancer's core express itself on crucial
+ events.
+ That way, when the app config sets log to "core", any core messages is
+ sent to the logger, and the end-user can see which route is chosen for
+ each request received.
+ Thanks to Gabor Szabo for the idea.
+ * New class Dancer::Timer added so any logger engine can now show a timer
+ string.
+ * Scaffolded applications are now built like a CPAN distribution, with a
+ Makefile.PL
+ and test scripts (thanks to Gabor Szabo for the idea).
+ * Added Dancer::Test to provide helpers for writing test script for Dancer
+ applications
+ * FIX bug when returning a void context after redirecting a route.
+ Thanks to Juan J. Martínez for the report.
+ * Add support for request headers in Dancer::Request
+ * Add support for halt() in Dancer's syntax.
+
+ [ Alex Kapranof ]
+ * Support for on-the-fly charset encoding when the setting is set and a
+ content is sent by Dancer and needs to be encoded.
+ The response Content-Type is updated accordingly as well.
+
+ [ Sawyer X ]
+ * Adding "import_warnings" settings. On by default, but allows to disable
+ auto-import of "warnings" pragma. Reported by Adam Kennedy.
Dnacer 1.176
- * Bringing 1.175_01 into production.
+ * Bringing 1.175_01 into production.
Dancer 1.175_01 (Developer release)
- [ Sawyer X ]
- * Documentation for Dancer::FileUtils.
- * Documentation for Dancer::Cookie.
- * Fixing PNG bug on IE (reported by Adam Kennedy - thank you).
+ [ Sawyer X ]
+ * Documentation for Dancer::FileUtils.
+ * Documentation for Dancer::Cookie.
+ * Fixing PNG bug on IE (reported by Adam Kennedy - thank you).
Dancer 1.175
- [ Sawyer X ]
- * RT #56395 reported by Jonathan Yu on behalf of Debian Perl team.
- * Documentation for Dancer::Error.
+ [ Sawyer X ]
+ * RT #56395 reported by Jonathan Yu on behalf of Debian Perl team.
+ * Documentation for Dancer::Error.
- [ Alexis Sukrieh ]
- * fixed t/15_plugins/02_config.t when YAML is not installed
+ [ Alexis Sukrieh ]
+ * fixed t/15_plugins/02_config.t when YAML is not installed
Dancer 1.174
- [ Gabor Szabo ]
- * Docs fixes, typo in warning.
- * TestUtils.pm is now in "t/lib".
+ [ Gabor Szabo ]
+ * Docs fixes, typo in warning.
+ * TestUtils.pm is now in "t/lib".
- [ David Precious ]
- * Support semi-colons as name=value pair separators when parsing
- querystring. Satisfies feature request/issue 59.
- Thanks to deepakg for requesting this feature.
+ [ David Precious ]
+ * Support semi-colons as name=value pair separators when parsing
+ querystring. Satisfies feature request/issue 59.
+ Thanks to deepakg for requesting this feature.
- [ Sawyer X ]
- * RT #56381 reported by Jonathan Yu on behalf of Debian Perl team.
- (Adding LICENSE file)
+ [ Sawyer X ]
+ * RT #56381 reported by Jonathan Yu on behalf of Debian Perl team.
+ (Adding LICENSE file)
Dancer 1.173_01 (Developer release)
- [ Franck Cuny ]
- * Doc fixes.
- (Thanks to poisonbit)
- * Plugins configuration
- * Cleaning up tests
-
- [ Alexis Sukrieh ]
- * New serializer: Dumper for easily output dumped variable
- in text/plain.
- * Before filters can now access route params
- * Support for '.' as a token separator in params parsing
- * The standalone server respect the 'access_log' setting,
- the starting banner is printed on STDERR only if the
- setting is set to true.
-
- [ Sawyer X ]
- * Fixed Windows PSGI.URL_SCHEME bug, causing tests to fail
- (Thanks to ADAMK for reporting)
+ [ Franck Cuny ]
+ * Doc fixes.
+ (Thanks to poisonbit)
+ * Plugins configuration
+ * Cleaning up tests
+
+ [ Alexis Sukrieh ]
+ * New serializer: Dumper for easily output dumped variable
+ in text/plain.
+ * Before filters can now access route params
+ * Support for '.' as a token separator in params parsing
+ * The standalone server respect the 'access_log' setting,
+ the starting banner is printed on STDERR only if the
+ setting is set to true.
+
+ [ Sawyer X ]
+ * Fixed Windows PSGI.URL_SCHEME bug, causing tests to fail
+ (Thanks to ADAMK for reporting)
Dancer 1.173
- [ Alexis Sukrieh ]
- * Documenting set_cookie in Dancer.pm.
+ [ Alexis Sukrieh ]
+ * Documenting set_cookie in Dancer.pm.
- [ Franck Cuny ]
- * Cleaning up serializer test.
+ [ Franck Cuny ]
+ * Cleaning up serializer test.
- [ François Charlier ]
- * Documenting layout disabling.
+ [ François Charlier ]
+ * Documenting layout disabling.
- [ Sawyer X ]
- * Fix a few failing tests because of compilation errors.
- * Add init{} subs for all serializers.
- * Dancer::Engine documentation
+ [ Sawyer X ]
+ * Fix a few failing tests because of compilation errors.
+ * Add init{} subs for all serializers.
+ * Dancer::Engine documentation
- [ David Precious ]
- * Fix issue 52 - creating invalid cookie expiration dates.
- Thanks to Juanjo (reidrac) for reporting!
+ [ David Precious ]
+ * Fix issue 52 - creating invalid cookie expiration dates.
+ Thanks to Juanjo (reidrac) for reporting!
Dancer 1.172
- [ Alexis Sukrieh ]
- * Plugin support.
+ [ Alexis Sukrieh ]
+ * Plugin support.
- [ Franck Cuny ]
- * Prevent usage of reserved Dancer keywords in plugins.
- * Tests cleanups.
+ [ Franck Cuny ]
+ * Prevent usage of reserved Dancer keywords in plugins.
+ * Tests cleanups.
- [ Robert Olson ]
- * Fixing docs to clarify layouts can use variables too.
+ [ Robert Olson ]
+ * Fixing docs to clarify layouts can use variables too.
Dancer 1.171
- [ Alexis Sukrieh ]
- * Removed bogus TestApp/ directory
+ [ Alexis Sukrieh ]
+ * Removed bogus TestApp/ directory
Dancer 1.170
- [ David Precious ]
- * Fixed bug with status keyword not converting aliases (e.g. 'not_found') to
- real usable status lines with valid HTTP codes.
- Thanks to P Kishor for reporting this on the dancer-users mailing list!
- * Accept end_tag as a synonym for stop_tag when configuring TemplateToolkit.
- Thanks to James Ronan for bringing this up.
-
- [ Sawyer X]
- * Route::Cache store_route = store_path, beefed up docs
- * Changed names of limits in settings
- * Added documentation for it in Dancer.pm
- * More documentation about Module::Refresh dependency
- (closes bug #48)
- * uri_for now accepts a boolean for not escaping URIs,
- and redirect calls uri_for with that boolean.
- (closes: bug #47)
-
- [ Alexis Sukrieh ]
- * Query string params are not dropped anymore when their value is 0. thanks
- to "Squeeks" for the report.
- (closes: bug #49)
- * Support for file uploads
- The Dancer::Request class provides a common interface to access file
- uploads. Syntactic sugar has been added to Dancer's as well
- (keyword 'upload').
- (closes whish #36)
-
- [ Franck Cuny ]
- * Support for automatic serialization/deserialization
- Dancer is now able to serialize route handler's response in various
- format (JSON, YAML, XML); and can also deserialize request body when
- appropriate.
- (closes: wish #29)
+ [ David Precious ]
+ * Fixed bug with status keyword not converting aliases (e.g. 'not_found') to
+ real usable status lines with valid HTTP codes.
+ Thanks to P Kishor for reporting this on the dancer-users mailing list!
+ * Accept end_tag as a synonym for stop_tag when configuring TemplateToolkit.
+ Thanks to James Ronan for bringing this up.
+
+ [ Sawyer X]
+ * Route::Cache store_route = store_path, beefed up docs
+ * Changed names of limits in settings
+ * Added documentation for it in Dancer.pm
+ * More documentation about Module::Refresh dependency
+ (closes bug #48)
+ * uri_for now accepts a boolean for not escaping URIs,
+ and redirect calls uri_for with that boolean.
+ (closes: bug #47)
+
+ [ Alexis Sukrieh ]
+ * Query string params are not dropped anymore when their value is 0. thanks
+ to "Squeeks" for the report.
+ (closes: bug #49)
+ * Support for file uploads
+ The Dancer::Request class provides a common interface to access file
+ uploads. Syntactic sugar has been added to Dancer's as well
+ (keyword 'upload').
+ (closes whish #36)
+
+ [ Franck Cuny ]
+ * Support for automatic serialization/deserialization
+ Dancer is now able to serialize route handler's response in various
+ format (JSON, YAML, XML); and can also deserialize request body when
+ appropriate.
+ (closes: wish #29)
Dancer 1.160
- [ David Precious ]
- * Added session backend Dancer::Session::Simple
- * Dump session contents on development error page, if session is in use
- * Censor sensitive-looking information on development error page settings /
- session dumps, to help avoid passwords / card details etc being leaked.
- * Add deployment guide
-
- [ Alexis Sukrieh ]
- * Dancer helper propagates its perl executable into the generated
- $appname.pl script (FIX for RT #54759).
- * FIX for issue #34
- No more warnings undeer Win32 for tests script that needs a tempdir
- * FIX (unknown bug)
- The standalone server now parses commandline options (was broken
- since 1.140).
- * FIX for issue #37
- A new setting "confdir" is provided for making Dancer
- read the application configuration files from an
- alternate location.
- * Core settings can be initialized via environment
- variables, prefixed with "DANCER_" (e.g. "DANCER_DAEMON"
- for the setting "daemon").
- * Config and command-line arguments are parsed and loaded at import time,
- rather than when the handler is initialized.
- * Routes are compiled at startup instead of being compiled whenever a
- request is handled. This can increase performances up to 50%.
- * FIX Params are not polluted anymore by the 'splat' keyword when no capture
- is needed by the pattern.
- * New feature 'auto_page' (closes: #41)
- Lets the user have automatic route resolution for
- requests that match an existing template in the views dir. Thanks to
- David Precious for the idea and his help.
-
- [ Daniel Tasov ]
- * Plack environment is propagated to Dancer if none specified.
-
- [ Sawyer X ]
- * Route Caching with size and path number limits: Dancer::Route::Cache.
- * FIX for issue #39.
- * Dancer::ModuleLoader documentation
- * Cleaned Dancer::Template::Abstract docs
- * Cleaner die in Dancer::Engine if can't find engine
- * Added default route example in Dancer::Cookbook
+ [ David Precious ]
+ * Added session backend Dancer::Session::Simple
+ * Dump session contents on development error page, if session is in use
+ * Censor sensitive-looking information on development error page settings /
+ session dumps, to help avoid passwords / card details etc being leaked.
+ * Add deployment guide
+
+ [ Alexis Sukrieh ]
+ * Dancer helper propagates its perl executable into the generated
+ $appname.pl script (FIX for RT #54759).
+ * FIX for issue #34
+ No more warnings undeer Win32 for tests script that needs a tempdir
+ * FIX (unknown bug)
+ The standalone server now parses commandline options (was broken
+ since 1.140).
+ * FIX for issue #37
+ A new setting "confdir" is provided for making Dancer
+ read the application configuration files from an
+ alternate location.
+ * Core settings can be initialized via environment
+ variables, prefixed with "DANCER_" (e.g. "DANCER_DAEMON"
+ for the setting "daemon").
+ * Config and command-line arguments are parsed and loaded at import time,
+ rather than when the handler is initialized.
+ * Routes are compiled at startup instead of being compiled whenever a
+ request is handled. This can increase performances up to 50%.
+ * FIX Params are not polluted anymore by the 'splat' keyword when no capture
+ is needed by the pattern.
+ * New feature 'auto_page' (closes: #41)
+ Lets the user have automatic route resolution for
+ requests that match an existing template in the views dir. Thanks to
+ David Precious for the idea and his help.
+
+ [ Daniel Tasov ]
+ * Plack environment is propagated to Dancer if none specified.
+
+ [ Sawyer X ]
+ * Route Caching with size and path number limits: Dancer::Route::Cache.
+ * FIX for issue #39.
+ * Dancer::ModuleLoader documentation
+ * Cleaned Dancer::Template::Abstract docs
+ * Cleaner die in Dancer::Engine if can't find engine
+ * Added default route example in Dancer::Cookbook
Dancer 1.150
- [ Alexis Sukrieh ]
- * Refactored all core engines with Dancer::Engine
- * Support for engine configuration via config files
- * Each core template engine now uses start_tag/stop_tag from the
- configuration instead of harcoding '<%' and '%>'.
- * FIX for issue #34
- Cookies can now be used when the application is ran under a Plack
- server.
-
- [ David Precious ]
- * Lots of documentation cleaning and fixes.
- * Make the session available to the views, if possible.
- * Added Dancer::Cookbook to provide lots of concrete examples for
- newcomers.
- * Helper script `dancer' now provides a default favicon.ico in the
- application public directory.
- * FIX for issue #30
- Added 'config' method to provide easy access to app config
-
- [ Anirvan Chatterjee ]
- * Various documentation typo fixes
-
- [ Danijel Tasov ]
- * FIX for issue #24
- Dancer now depends on MIME::Types rather than using
- File::MimeInfo::Simple which uses a fork().
-
- [ Paul Driver ]
- * Support for virtual location.
- It's now possible to mount a Dancer app under a user-defined prefix.
-
- [ Franck Cuny ]
- * Test scripts cleanup:
- + Cleanup is performed in test scripts when necessary
- (all temp files are removed at the end of the script).
- + FIX for issue #23
- Test scripts that try to write logfiles set the appdir.
+ [ Alexis Sukrieh ]
+ * Refactored all core engines with Dancer::Engine
+ * Support for engine configuration via config files
+ * Each core template engine now uses start_tag/stop_tag from the
+ configuration instead of harcoding '<%' and '%>'.
+ * FIX for issue #34
+ Cookies can now be used when the application is ran under a Plack
+ server.
+
+ [ David Precious ]
+ * Lots of documentation cleaning and fixes.
+ * Make the session available to the views, if possible.
+ * Added Dancer::Cookbook to provide lots of concrete examples for
+ newcomers.
+ * Helper script `dancer' now provides a default favicon.ico in the
+ application public directory.
+ * FIX for issue #30
+ Added 'config' method to provide easy access to app config
+
+ [ Anirvan Chatterjee ]
+ * Various documentation typo fixes
+
+ [ Danijel Tasov ]
+ * FIX for issue #24
+ Dancer now depends on MIME::Types rather than using
+ File::MimeInfo::Simple which uses a fork().
+
+ [ Paul Driver ]
+ * Support for virtual location.
+ It's now possible to mount a Dancer app under a user-defined prefix.
+
+ [ Franck Cuny ]
+ * Test scripts cleanup:
+ + Cleanup is performed in test scripts when necessary
+ (all temp files are removed at the end of the script).
+ + FIX for issue #23
+ Test scripts that try to write logfiles set the appdir.
Dancer 1.140
- * Dancer now depends on HTTP::Server::Simple::PSGI in
- order to rely on a PSGI environement even when running
- the app with the standalone server
- (Thanks to Tatsuiko Miyagawa).
- * Dancer::Request object enhancements:
- + Dancer::Request now provide an accesor to the raw body
- of the request.
- + FIX for issue #13
- The params helper now provides accessors to route
- params, query string params and body params so the
- user can chose from which source they want to access
- params instead of dealing with a mixed structure.
- + Added accessors to referer and remote_address
- * The Standalone server now uses the setting 'server' to
- bind itself to the IP address given by the setting.
- Default value is 0.0.0.0
+ * Dancer now depends on HTTP::Server::Simple::PSGI in
+ order to rely on a PSGI environement even when running
+ the app with the standalone server
+ (Thanks to Tatsuiko Miyagawa).
+ * Dancer::Request object enhancements:
+ + Dancer::Request now provide an accesor to the raw body
+ of the request.
+ + FIX for issue #13
+ The params helper now provides accessors to route
+ params, query string params and body params so the
+ user can chose from which source they want to access
+ params instead of dealing with a mixed structure.
+ + Added accessors to referer and remote_address
+ * The Standalone server now uses the setting 'server' to
+ bind itself to the IP address given by the setting.
+ Default value is 0.0.0.0
Dancer 1.130
- * Fix a memory leak that could occur between two
- requests under mod_perl (Thanks to Nicolas Rennert for
- the report and diagnosis).
- * remove all optional modules from the core, they are now
- shipped as separate CPAN distributions:
- - Dancer::Template::MicroTemplate
- - Dancer::Session::Cookie
- - Dancer::Session::Memcached
- - Dancer::Logger::LogHandler
- - Dancer::Logger::Syslog
- * support for the `header' keyword in Dancer's syntax.
- The user is now able to alter response-headers in route
- handlers.
- * support for `prefix' keyword in Dancer's syntax.
- A prefix can be set by the user before defining routes handlers.
- All route defined then will be automatically prefixed accordingly.
+ * Fix a memory leak that could occur between two
+ requests under mod_perl (Thanks to Nicolas Rennert for
+ the report and diagnosis).
+ * remove all optional modules from the core, they are now
+ shipped as separate CPAN distributions:
+ - Dancer::Template::MicroTemplate
+ - Dancer::Session::Cookie
+ - Dancer::Session::Memcached
+ - Dancer::Logger::LogHandler
+ - Dancer::Logger::Syslog
+ * support for the `header' keyword in Dancer's syntax.
+ The user is now able to alter response-headers in route
+ handlers.
+ * support for `prefix' keyword in Dancer's syntax.
+ A prefix can be set by the user before defining routes handlers.
+ All route defined then will be automatically prefixed accordingly.
Dancer 1.122
- * Fix the test suite under Perl 5.8.x
- * Security Fix: protection from CRLF injection in
- response headers (thanks to Mark Stosberg for the report).
- * Support for multi-valued params in GET/POST data (thanks to
- Mark Stosberg for the report).
- * Backward compatibility with old app.psgi files, don't die
- when a request is initialized with a CGI::PSGI object.
+ * Fix the test suite under Perl 5.8.x
+ * Security Fix: protection from CRLF injection in
+ response headers (thanks to Mark Stosberg for the report).
+ * Support for multi-valued params in GET/POST data (thanks to
+ Mark Stosberg for the report).
+ * Backward compatibility with old app.psgi files, don't die
+ when a request is initialized with a CGI::PSGI object.
Dancer 1.121
- * Fix for POST data parsing (was broken in 1.120)
- now Dancer depends on HTTP::Body for that.
+ * Fix for POST data parsing (was broken in 1.120)
+ now Dancer depends on HTTP::Body for that.
Dancer 1.120
- * ROADMAP updated
- * Dancer is now compliant with Plack::Server::Apache2
- * Remove the CGI.pm dependency, huge refactoring
- * POD typo fixes (Naveed)
- * Support for syntax-only importation (Sawyer X)
- * Remove the example/ directory, useless and deprecated
- * New logger engine: Log::Handler (franck cuny)
- * New template engine Text::Microtemplate (franck cuny)
- * Remove compilation-time warnings catching (issue #14)
+ * ROADMAP updated
+ * Dancer is now compliant with Plack::Server::Apache2
+ * Remove the CGI.pm dependency, huge refactoring
+ * POD typo fixes (Naveed)
+ * Support for syntax-only importation (Sawyer X)
+ * Remove the example/ directory, useless and deprecated
+ * New logger engine: Log::Handler (franck cuny)
+ * New template engine Text::Microtemplate (franck cuny)
+ * Remove compilation-time warnings catching (issue #14)
Dancer 1.110
- * Fix test script `t/11_logger/04_syslog.t'
- * Fix test script `t/10_template/05_template_toolkit.t'
+ * Fix test script `t/11_logger/04_syslog.t'
+ * Fix test script `t/10_template/05_template_toolkit.t'
Dancer 1.100
- * Support for multiple method routes at once with 'any'
- * Templates engines
- + Bug fixes in Dancer::Template::Simple (Jury Gorky)
- + Refactoring of the factory
- + option for disabling the layout in the template helper.
- * New session engine based on encrypted cookies (Alex Kapranof)
- * More HTTP codes supported for a better REST compat (Nate Jones)
- * Documentation updates
- * script/dancer now requires an appname
- * New Makefile.PL with better metadata (CPAN Service)
+ * Support for multiple method routes at once with 'any'
+ * Templates engines
+ + Bug fixes in Dancer::Template::Simple (Jury Gorky)
+ + Refactoring of the factory
+ + option for disabling the layout in the template helper.
+ * New session engine based on encrypted cookies (Alex Kapranof)
+ * More HTTP codes supported for a better REST compat (Nate Jones)
+ * Documentation updates
+ * script/dancer now requires an appname
+ * New Makefile.PL with better metadata (CPAN Service)
Dancer 1.000
- * Support for Syslog logger (Dancer::Logger::Syslog)
- * Basic template engine so Template is no more a hard deps.
- * Memcache Session support (Dancer::Session::Memcache)
- * YAML file-based session support (Dancer::Session::YAML)
- * Lots of tests (more than 80% of the code is covered)
+ * Support for Syslog logger (Dancer::Logger::Syslog)
+ * Basic template engine so Template is no more a hard deps.
+ * Memcache Session support (Dancer::Session::Memcache)
+ * YAML file-based session support (Dancer::Session::YAML)
+ * Lots of tests (more than 80% of the code is covered)
Dancer 0.9906
- * move from File::MimeInfo to File::MimeInfo::Simple for
- smooth run on Mac OSX and Win32 systems.
+ * move from File::MimeInfo to File::MimeInfo::Simple for
+ smooth run on Mac OSX and Win32 systems.
Dancer 0.9005
- * Source code extract on error catching
- * Support for configurable error handling
- * New design for the starting app built with script/dancer
+ * Source code extract on error catching
+ * Support for configurable error handling
+ * New design for the starting app built with script/dancer
Dancer 0.9004
- * Support for PSGI/Plack environment
- * script/dancer helper script for bootstraping a new app
+ * Support for PSGI/Plack environment
+ * script/dancer helper script for bootstraping a new app
Dancer 0.9003
- * Detect differently compilation-time warnings and runtime warnings
- closes bug #48440 (Thanks to Enric Joffrion for the report, and to
- Vincent Pit for the diagnosis)
+ * Detect differently compilation-time warnings and runtime warnings
+ closes bug #48440 (Thanks to Enric Joffrion for the report, and to
+ Vincent Pit for the diagnosis)
View
2  MANIFEST
@@ -34,6 +34,7 @@ lib/Dancer/Logger.pm
lib/Dancer/Logger/Abstract.pm
lib/Dancer/Logger/Console.pm
lib/Dancer/Logger/File.pm
+lib/Dancer/MIME.pm
lib/Dancer/ModuleLoader.pm
lib/Dancer/Object.pm
lib/Dancer/Object/Singleton.pm
@@ -66,7 +67,6 @@ lib/Dancer/Template/TemplateToolkit.pm
lib/Dancer/Test.pm
lib/Dancer/Timer.pm
lib/Dancer/Tutorial.pod
-lib/Dancer/Tutorial/WebSockets.pod
LICENSE
Makefile.PL
MANIFEST This list of files
View
53 lib/Dancer.pm
@@ -24,14 +24,14 @@ use Dancer::Session;
use Dancer::SharedData;
use Dancer::Handler;
use Dancer::ModuleLoader;
-
+use Dancer::MIME;
use File::Spec;
use File::Basename 'basename';
use base 'Exporter';
$AUTHORITY = 'SUKRIA';
-$VERSION = '1.3000_02';
+$VERSION = '1.3001';
@EXPORT = qw(
after
any
@@ -129,7 +129,12 @@ sub header { goto &headers; } # goto ftw!
sub layout { set(layout => shift) }
sub load { require $_ for @_ }
sub logger { set(logger => @_) }
-sub mime_type { Dancer::Config::mime_types(@_) }
+sub mime_type {
+ my $mime = Dancer::MIME->instance();
+ if (scalar(@_)==2) { $mime->add_mime_type(@_) }
+ elsif (scalar(@_)==1) { $mime->mime_type_for(@_) }
+ else { $mime->aliases }
+}
sub params { Dancer::SharedData->request->params(@_) }
sub pass { Dancer::Response->pass }
sub path { realpath(Dancer::FileUtils::path(@_)) }
@@ -138,7 +143,7 @@ sub prefix { Dancer::App->current->set_prefix(@_) }
sub del { Dancer::App->current->registry->universal_add('delete', @_) }
sub options { Dancer::App->current->registry->universal_add('options', @_) }
sub put { Dancer::App->current->registry->universal_add('put', @_) }
-sub r { carp "'r' is DEPRECATED use qr{} instead"; return {regexp => $_[0]} }
+sub r { croak "'r' is DEPRECATED use qr{} instead"; }
sub redirect { Dancer::Helpers::redirect(@_) }
sub render_with_layout { Dancer::Helpers::render_with_layout(@_); }
sub request { Dancer::SharedData->request }
@@ -329,11 +334,11 @@ Dancer apps can be used with a an embedded web server (great for easy testing),
and can run under PSGI/Plack for easy deployment in a variety of webserver
environments.
-=head1 DISCLAIMER
+=head1 MORE DOCUMENTATION
This documentation describes all the exported symbols of Dancer. If you want
a quick start guide to discover the framework, you should look at
-L<Dancer::Introduction>.
+L<Dancer::Introduction>, or L<Dancer::Tutorial> to learn by example.
If you want to have specific examples of code for real-life problems, see the
L<Dancer::Cookbook>.
@@ -341,6 +346,9 @@ L<Dancer::Cookbook>.
If you want to see configuration examples of different deployment solutions
involving Dancer and Plack, see L<Dancer::Deployment>.
+You can find out more about the many useful plugins available for Dancer in
+L<Dancer::Plugins>.
+
=head1 METHODS
=head2 after
@@ -412,6 +420,14 @@ Accesses cookies values, which returns a hashref of L<Dancer::Cookie> objects:
return $cookie->value;
};
+In the case you have stored something else than a scalar in your cookie:
+
+ get '/some_action' => sub {
+ my $cookie = cookies->{oauth};
+ my %values = $cookie->value;
+ return ($values{token}, $values{token_secret});
+ };
+
=head2 config
Accesses the configuration of the application:
@@ -430,6 +446,14 @@ Sets the B<content-type> rendered, for the current route handler:
# here we can dump the contents of params->{txtfile}
};
+You can use abbreviations for content types. For instance:
+
+ get '/svg/:id' => sub {
+ content_type 'svg';
+
+ # here we can dump the image with id params->{id}
+ };
+
Note that if you want to change the default content-type for every route, you
have to change the setting C<content_type> instead.
@@ -777,6 +801,8 @@ Lets the current route handler send a file to the client.
The content-type will be set depending on the current mime-types definition
(see C<mime_type> if you want to define your own).
+The path of the file must be relative to the B<public> directory.
+
=head2 set
Defines a setting:
@@ -801,6 +827,18 @@ Creates or updates cookie values:
In the example above, only 'name' and 'value' are mandatory.
+You can also store more complex structure in your cookies:
+
+ get '/some_auth' => sub {
+ set_cookie oauth => {
+ token => $twitter->request_token,
+ token_secret => $twitter->secret_token,
+ ...
+ };
+ };
+
+You can't store more complex structure than this. All your keys in your hash should be scalar.
+
=head2 session
Provides access to all data stored in the current
@@ -1015,6 +1053,9 @@ L<http://github.com/sukria/Dancer>
The Dancer development team can be found on #dancer on irc.perl.org:
L<irc://irc.perl.org/dancer>
+If you don't have an IRC client installed/configured, there is a simple web chat
+client at L<http://www.perldancer.org/irc> for you.
+
There is also a Dancer users mailing list available - subscribe at:
L<http://lists.perldancer.org/cgi-bin/listinfo/dancer-users>
View
27 lib/Dancer/Config.pm
@@ -14,16 +14,11 @@ use Encode;
@EXPORT_OK = qw(setting mime_types);
+my $SETTINGS = {};
+
# mergeable settings
my %MERGEABLE = map { ($_ => 1) } qw( plugins handlers );
-# singleton for storing settings
-my $SETTINGS = {
-
- # user defined mime types
- mime_types => {},
-};
-
sub settings {$SETTINGS}
my $setters = {
@@ -89,6 +84,14 @@ my $normalizers = {
},
};
+sub mime_types {
+ carp "DEPRECATED: use 'mime_type' from Dancer.pm";
+ my $mime = Dancer::MIME->instance();
+ if (scalar(@_)==2) { $mime->add_mime_type(@_) }
+ elsif (scalar(@_)==1) { $mime->mime_type_for(@_) }
+ else { $mime->aliases }
+}
+
sub normalize_setting {
my ($class, $setting, $value) = @_;
@@ -135,16 +138,6 @@ sub _get_setting {
return $SETTINGS->{$setting};
}
-sub mime_types {
- my ($ext, $content_type) = @_;
- $SETTINGS->{mime_types} ||= {};
- return $SETTINGS->{mime_types} if @_ == 0;
-
- return (@_ == 2)
- ? $SETTINGS->{mime_types}{$ext} = $content_type
- : $SETTINGS->{mime_types}{$ext};
-}
-
sub conffile { path(setting('confdir') || setting('appdir'), 'config.yml') }
sub environment_file {
View
23 lib/Dancer/Cookie.pm
@@ -2,11 +2,14 @@ package Dancer::Cookie;
use strict;
use warnings;
+use URI::Escape;
+
use base 'Dancer::Object';
-__PACKAGE__->attributes('name', 'value', 'expires', 'domain', 'path');
+__PACKAGE__->attributes('name', 'expires', 'domain', 'path');
sub init {
- my $self = shift;
+ my ($self, %args) = @_;
+ $self->value($args{value});
if ($self->expires) {
$self->expires(_epoch_to_gmtstring($self->expires))
if $self->expires =~ /^\d+$/;
@@ -17,13 +20,27 @@ sub init {
sub to_header {
my $self = shift;
my $header = '';
- $header .= $self->name . '=' . $self->value . '; ';
+
+ my $value = join('&', map {uri_escape($_)} $self->value);
+ $header .= $self->name . '=' . $value . '; ';
$header .= "path=" . $self->path . "; " if $self->path;
$header .= "expires=" . $self->expires . "; " if $self->expires;
$header .= "domain=" . $self->domain . "; " if $self->domain;
$header .= 'HttpOnly';
}
+sub value {
+ my ( $self, $value ) = @_;
+ if ( defined $value ) {
+ my @values =
+ ref $value eq 'ARRAY' ? @$value
+ : ref $value eq 'HASH' ? %$value
+ : ($value);
+ $self->{'value'} = [@values];
+ }
+ return wantarray ? @{ $self->{'value'} } : $self->{'value'}->[0];
+}
+
sub _epoch_to_gmtstring {
my ($epoch) = @_;
View
13 lib/Dancer/Cookies.pm
@@ -5,6 +5,8 @@ use warnings;
use Dancer::Cookie;
use Dancer::SharedData;
+use URI::Escape;
+
# all cookies defined by the application are store in that singleton
# this is a hashref the represent all key/value pairs to store as cookies
my $COOKIES = {};
@@ -21,11 +23,16 @@ sub parse_cookie_from_env {
return {} unless defined $env_str;
my $cookies = {};
- foreach my $cookie (split('; ', $env_str)) {
- my ($name, $value) = split('=', $cookie);
+ foreach my $cookie ( split( '; ', $env_str ) ) {
+ my ( $name, $value ) = split( '=', $cookie );
+ my @values;
+ if ( $value ne '' ) {
+ @values = map { uri_unescape($_) } split( /[&;]/, $value );
+ }
$cookies->{$name} =
- Dancer::Cookie->new(name => $name, value => $value);
+ Dancer::Cookie->new( name => $name, value => \@values );
}
+
return $cookies;
}
View
216 lib/Dancer/Development.pod
@@ -5,42 +5,95 @@ Dancer::Development - guide for developers interested in contributing
=head1 DESCRIPTION
-This guide has been written to help developers of the project in their daily
-needs. This guide is the reference for any developer working on Dancer.
+This guide has been written to help anyone interested in contributing to the
+development of Dancer.
-If you want to contribute code to Dancer you should first start by reading this
-guide.
+First of all - thank you for your interest in the project! It's the community
+of helpful contributors who've helped Dancer experience phenominal growth to get
+to where it is today.
+Please read this guide before contributing to Dancer, to avoid wasted effort and
+maximise the chances of your contributions being used.
-=head1 HOW TO CONTRIBUTE
+=head1 WAYS TO CONTRIBUTE
-There are many ways to contribute to the project. Dancer is a young yet avtice
-project and any kind of help is appreciated.
+There are many ways to contribute to the project. Dancer is a young yet active
+project and any kind of help is very much appreciated!
-=head2 Marketing
+=head2 Publicity
-You don't have to start by hacking the code, spreadign the good words in
-valuable as well. If you have a blog, just feel free to speak about Dancer.
+You don't have to start by hacking the code, spreading the word is very
+valuable as well!
-If you're a twitter user, you can tweet about it with the hashtag C<#perl>.
+If you have a blog, just feel free to speak about Dancer.
+
+If you're a Twitter user, you can tweet about it with the hashtag C<#perl> (and
+feel free to follow C<@PerlDancer> for news and updates on Dancer!).
+
+Of course, dissemination efforts don't have to limited to blogs or Twitter.
+Feel free to spread the word in whatever way you consider fit and drop us a
+line on the Dancer user mailing list, see below.
+
+Also, if you're using and enjoying Dancer,
+L<http://cpanratings.perl.org/dist/Dancer|rating us on cpanratings.perl.org>
+explaining what you like about Dancer is another very valuable contribution, to
+help other new users find us!
+
+
+=head2 Mailing list / IRC community
+
+Subscribing to the mailing list and/or hanging our on our IRC channel and
+providing assistance to new users is incredibly valuable.
+
+=over 4
+
+=item *
+
+Mailing list: L<http://lists.perldancer.org/cgi-bin/listinfo/dancer-users> to
+subscribe or view archives
+
+=item *
+
+IRC: C<#dancer> on C<irc.perl.org>, or L<http://www.perldancer.org/irc> for
+quick web client.
+
+=back
=head2 Documentation
-We do give lots of importance to documentation, but it's difficult to keep it
-up-to-date and error-prone. If you find a typo or an error in a documentation
-you can submit a patch with your fix (see "Patch submission").
+We do value documentation very much, but it's difficult to keep it up-to-date.
+If you find a typo or an error in the documentation please do let us know -
+ideally, by submitting a patch with your fix (see "Patch Submission").
+
+=head2 Contribute to CPAN Testers
+
+Especially, if you have access to perl on rare operating systems, please
+consider contributing tests. See
+L<http://wiki.cpantesters.org/wiki/TestDuringInstall> for more information.
+
+=head2 Code
+
+You can write extensions (so-called plugins) for Dancer extending Dancer's core
+functionality or contribute to Dancer's core code, see "Patch Submission" below.
+
+=head1 GENERAL DEVELOPMENT GUIDELINES
+
+This section lists high-level recommendations for developing Dancer, for more
+detailled guidelines, see "Coding Guidelines" below.
=head2 Quality Assurance
-We call "Quality Assurance" the fact that we keep in mind that Dancer should ne
-able to install into all version of Perl since Perl 5.8, on any platforms.
+Dancer should be able to install for all Perl versions since 5.8, on any
+platform for which Perl exists.
-We should avoid as much as possible regressions and backward compatibility
-should be always in mind when refactoring.
+We should avoid regressions as much as possible and keep backwards
+compatibility in mind when refactoring. Stable releases will not break
+functionality and new releases provide upgrade path and upgrade tips, e.g.
+warn about deprecated functionality.
-=head2 Quality supervision
+=head2 Quality Supervision
-Our weapon for being aware of our quality is the CPAN testers platform:
+Our weapon for being aware of our quality is the CPAN testers platform:
L<http://www.cpantesters.org>.
A good way to help the project is to find a failing build log on the CPAN
@@ -49,52 +102,56 @@ testers: L<http://www.cpantesters.org/distro/D/Dancer.html>
If you find a failing test report, feel free to report it as a GitHub issue:
L<http://github.com/sukria/Dancer/issues>.
-=head2 Reporting bugs
+=head2 Reporting Bugs
We prefer to have all our bug reports on GitHub, in the issues section:
<http://github.com/sukria/Dancer/issues>. It's possible though to report bugs
on RT as well: L<https://rt.cpan.org/Dist/Display.html?Queue=Dancer>
-Please make sure the bug you're reporting is not yet present, in doubt ask on
-IRC.
+Please make sure the bug you're reporting does not yet exist. In doubt please
+ask on IRC.
-=head2 Patch submission
+=head2 Patch Submission
-The Dancer's development team uses GitHub to collaborate. Any contribution must
-be submited via GitHub.
+The Dancer development team uses GitHub to collaborate. We greatly appreciate
+contributions submitted via GitHub, as it makes tracking these contributions and
+applying them much, much easier - therefore giving a much better chance of your
+contribution being integrated into Dancer quickly!
-In order to make the life of Dancer's integrator easier, git-flow is
-used to handle pull-requests, that means each contributor must work on
-their C<devel> branch rather than on their C<master>.
+To help us achieve high-quality, stable releases, git-flow workflow is used to
+handle pull-requests, that means contributors must work on their C<devel> branch
+rather than on their C<master>. (Master should be touched only by the core dev
+team when preparing a release to CPAN; all ongoing development happens in
+branches which are merged to the C<devel> branch.)
Here is the workflow for submitting a patch:
-=over 4
+=over 4
=item *
-Fork the repository L<http://github.com/sukria/Dancer>
+Fork the repository L<http://github.com/sukria/Dancer> (click "Fork")
=item *
-Clone your fork like the following:
+Clone your fork like the following, e.g.:
- $ git clone <PATH_TOUR_GIT_CLONE>
- $ cd Dancer
+ $ git clone git://github.com/myname/Dancer.git
=item *
As a contributor, you should B<always> work on the C<devel> branch of
your clone (C<master> is used only for building releases).
- $ git remote add upstream https://github.com/sukria/Dancer.git
+ $ git remote add upstream https://github.com/sukria/Dancer.git
+ $ git fetch upstream
$ git checkout -b devel upstream/devel
This will create a local branch in your clone named C<devel> and that
will track the offical C<devel> branch. That way, if you have more or
less commits than the upstream repo, you'll be immediatly notified by git.
-=item *
+=item *
You want to isolate all your commits in a I<topic> branch, this will make the
reviewing much easier for the core team and will allow you to continue working
@@ -120,22 +177,23 @@ You are now ready to send a pull request.
=item *
Send a I<pull request> via the GitHub interface. Make sure your pull request is
-based on the I<pr/$name> branch you've just pushed.
+based on the I<pr/$name> branch you've just pushed, so that it incorporates the
+appropriate commits only.
It's also a good idea to summarize your work in a report sent to the users
-mailing list, in order to make sure the team is aware of it.
+mailing list (see below), in order to make sure the team is aware of it.
-At least, you can notify the core team on IRC, on C<irc.perl.org>,
-chan C<#dancer>.
+You could also notify the core team on IRC, on C<irc.perl.org>, chan C<#dancer>
+or L<http://www.perldancer.org/irc>.
-=item *
+=item *
-When the core team review your pull request, either it will be accepted (and
-then merged into I<devel>) or refused.
+When the core team reviews your pull request, it will either accept (and
+then merge into I<devel>) or refuse your request.
If it's refused, make sure to understand the reasons explained by the team for
the denial. Most of the time, communicating with the core team is enough to
-understand what was the mistake.
+understand what was the mistake. Above all, please don't be offended.
If your pull-request is merged into I<devel>, then all you have to do is to
remove your local and remote I<pr/$name> branch:
@@ -153,7 +211,7 @@ You're now ready to start working on a new pull request!
=back
-=head1 About the releases cycle
+=head1 About the Release Cycle
Since version 1.2, the team has decided to take a step further toward
production concerns: Dancer now promises to provide an API-stable and
@@ -161,7 +219,7 @@ feature frozen release, whose updates will only be about bugfixes and
documentation updates.
After some discussion with the core-team members, it has been agreed
-that the 1.2xx releases serie will be the first of this kind, and will
+that the 1.2xx release series will be the first of this kind, and will
live as long as 1.3xx lives.
As soon as the last 1.3xx release is mature enough and tha the core
@@ -170,8 +228,8 @@ team is happy with, it will be uploaded as the first version of the
This let us evolves quickly in our main track (devel in GitHub will
contain all the daily work we want to make 1.3xx better) but as well,
-it lets us assure maintainability for thr 1.2 series, as we will
-propably have to fix a bug somewhere in 1.2 without merging with new
+it lets us assure maintainability for the 1.2 series, as we will
+probably have to fix a bug somewhere in 1.2 without merging with new
stuff contained in the devel branch.
That's why a maintenance branch is added to the repo. To be very
@@ -181,27 +239,29 @@ It should only contains fixes for bug or documentation updates.
If you want to submit a pull-request to the frozen branch (that means
1.3xx is out and you've found a bug in 1.2xx) you need to base your
-work on the C<frozen> branch. Use the same procdure explained before,
+work on the C<frozen> branch. Use the same procedure explained before,
but with the C<frozen> branch.
=head1 RESOURCES FOR DEVELOPERS
-=head2 Mailing lists
+=head2 Mailing Lists
A mailing list is available here:
L<http://lists.perldancer.org/cgi-bin/listinfo/dancer-users>
-=head2 IRC channels
+=head2 IRC Channels
-You can reach the development team on irc.perl.org, chan #dancer.
+You can reach the development team on irc.perl.org, chan #dancer or via a web
+chat interface at L<http://www.perldancer.org/irc>. We're always happy to hear
+from users and contributors.
=head2 Repositories
The official repository is hosted on GitHub at the following location:
-L<http://github.com/sukria/Dancer>.
+L<http://github.com/sukria/Dancer>.
Official developers have write access to this repository, contributors are
-invited to fork it if they want to submit patches, as explained in the
+invited to fork it if they want to submit patches, as explained in the
I<Patch submission> section.
The repository layout is organized as follows:
@@ -211,26 +271,29 @@ The repository layout is organized as follows:
=item * C<master>
This branch is dedicated to prepare CPAN releases. We push to that branch only
-for packaging a new release. Every CPAN version are made from this branch.
+for packaging a new release. Every CPAN version are made from this branch.
=item * C<devel>
-This is the development branch. Every new feature are supposed to be first
-pushed to that branch.
+This is the development branch. New features are pushed here, and will be merged
+to master when the next release is being prepared.
=back
=head1 CODING GUIDELINES
+This section describes standards and requirements for coding. For more broad
+guidelines, see "GENERAL DEVELOPMENT GUIDELINES" above.
-=head2 About dependencies
+=head2 About Dependencies
-Dancer is intended to be a micro-framework. That means among other things that it should remain
-lightweight. For this reason we try very hard to keep the dependency bag as low
-as possible. But we don't want either to reinvent the wheel.
+Dancer is intended to be a micro-framework. That means among other things that
+it should remain lightweight. For this reason we try very hard to keep the
+dependency bag as low as possible. But we don't want to reinvent the wheel
+either.
-The balance is not easy to do but you can keep in mind that unless a very good
-reason, the team won't accept a new dependency to be added to the core.
+The balance is not easy to do but you can keep in mind that unless for a very
+good reason, the team won't accept a new dependency to be added to the core.
If a patch provides a new feature that depends on a module, the solution is to
perform a dynamic loading. Dancer has a class dedicated to that job:
@@ -253,31 +316,26 @@ dependency check is performed at runtime.
=head1 RELEASING
-=head2 Public releases
+=head2 Public Releases
-=head2 Developer releases
+Public and stable releases are those without an underline ('_') in the version
+number. The latest stable release can be downloaded from CPAN and github.com.
-Whenever the devel branch has been merged into the master branch, the CPAN
-release built must be a developer version (the version number should contain a
+=head2 Developer Releases
+
+Developer releases are those which include an underline ('_') in the version
+number. Whenever the devel branch has been merged into the master branch, the
+CPAN release built must be a developer version (the version number contains a
'_').
Before a new release is made, the uploaders must wait for the CPAN testers
-reports. This is done to make sure the new merge doesn't brings regressions.
+reports. This is done to make sure the new merge doesn't bring regressions.
=head2 Roadmap
-The next major release is Dancer 1.2, all of the following items must be
-completed before this version is released.
-
-=over 4
-
-=item *
-
-=item *
-
-=back
+For current information on Dancer's plans for the future, see the file TODO at
+L<https://github.com/sukria/Dancer/blob/master/TODO>.
=head1 AUTHOR
This document has been written by Alexis Sukrieh L<sukria@cpan.org>
-
View
5 lib/Dancer/Handler/PSGI.pm
@@ -70,11 +70,8 @@ sub apply_plack_middlewares {
# XXX remove this after 1.2
if ( ref $middlewares eq 'HASH' ) {
- carp 'Listing Plack middlewares as a hash ref is DEPRECATED. '
+ croak 'Listing Plack middlewares as a hash ref is DEPRECATED. '
. 'Must be listed as an array ref.';
-
- map { $builder->add_middleware( $_, @{ $middlewares->{$_} } ) }
- keys %$middlewares;
}
else {
map {
View
16 lib/Dancer/Introduction.pod
@@ -8,6 +8,15 @@ Installation of Dancer is simple:
# perl -MCPAN -e 'install Dancer'
+Thanks to the magic of cpanminus, if you do not have CPAN.pm configured, or just
+want a quickfire way to get running, the following should work, at least on
+Unix-like systems:
+
+ # wget -O - http://cpanmin.us | sudo perl - Dancer
+
+(If you don't have root access, omit the 'sudo', and cpanminus will install
+Dancer and prereqs into C<~/perl5>.)
+
=head1 SETUP
Create a web application using the dancer script:
@@ -101,6 +110,13 @@ be set in the params hashref.
"Hey ".params->{name}.", welcome here!";
};
+Tokens can be made optional, for instance:
+
+ get '/hello/:name?' => sub {
+ "Hello there " . params->{name} || "whoever you are!";
+ };
+
+
=head2 WILDCARDS MATCHING
A route can contain a wildcard (represented by a '*'). Each wildcard match will
View
108 lib/Dancer/MIME.pm
@@ -0,0 +1,108 @@
+package Dancer::MIME;
+
+use strict;
+use warnings;
+use base 'Dancer::Object::Singleton';
+
+use MIME::Types;
+
+__PACKAGE__->attributes( qw/mime_type aliases/ );
+
+sub init {
+ my ($class, $instance) = @_;
+
+ $instance->mime_type(MIME::Types->new(only_complete => 1));
+ $instance->aliases({});
+}
+
+# if not used with care these two methods can create cyclic structures.
+# would prefer not to burn CPU testing for that, but I can...
+sub add_mime_type {
+ my ($self, $name, $mime_type) = @_;