r57512 - in /trunk/libdancer-perl: ./ debian/ lib/ lib/Dancer/ t/15_plugins/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed May 5 15:05:51 UTC 2010
Author: jawnsy-guest
Date: Wed May 5 15:05:26 2010
New Revision: 57512
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57512
Log:
integrate new upstream version
Modified:
trunk/libdancer-perl/CHANGES
trunk/libdancer-perl/META.yml
trunk/libdancer-perl/debian/changelog
trunk/libdancer-perl/lib/Dancer.pm
trunk/libdancer-perl/lib/Dancer/Config.pm
trunk/libdancer-perl/lib/Dancer/Cookie.pm
trunk/libdancer-perl/lib/Dancer/Deployment.pod
trunk/libdancer-perl/lib/Dancer/Error.pm
trunk/libdancer-perl/lib/Dancer/FileUtils.pm
trunk/libdancer-perl/lib/Dancer/HTTP.pm
trunk/libdancer-perl/lib/Dancer/Plugin.pm
trunk/libdancer-perl/lib/Dancer/Renderer.pm
trunk/libdancer-perl/lib/Dancer/Request.pm
trunk/libdancer-perl/t/15_plugins/02_config.t
Modified: trunk/libdancer-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/CHANGES?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/CHANGES (original)
+++ trunk/libdancer-perl/CHANGES Wed May 5 15:05:26 2010
@@ -1,3 +1,20 @@
+Dnacer 1.176
+ * 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).
+
+Dancer 1.175
+ [ 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
+
Dancer 1.174
[ Gabor Szabo ]
* Docs fixes, typo in warning.
@@ -9,7 +26,7 @@
Thanks to deepakg for requesting this feature.
[ Sawyer X ]
- * RT #56381 reported by Jonathan Yu on behalf on Debian Perl team.
+ * RT #56381 reported by Jonathan Yu on behalf of Debian Perl team.
(Adding LICENSE file)
Dancer 1.173_01 (Developer release)
Modified: trunk/libdancer-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/META.yml?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/META.yml (original)
+++ trunk/libdancer-perl/META.yml Wed May 5 15:05:26 2010
@@ -1,31 +1,19 @@
--- #YAML:1.0
-name: Dancer
-version: 1.174
-abstract: A minimal-effort oriented web application framework
-author: []
-license: perl
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
-build_requires:
- ExtUtils::MakeMaker: 0
-requires:
- File::Basename: 0
- File::Spec: 0
- HTTP::Body: 0
- HTTP::Server::Simple::PSGI: 0.11
- MIME::Types: 0
- Test::More: 0.87
- URI: 0
-resources:
- bugtracker: http://github.com/sukria/Dancer/issues
- homepage: http://perldancer.org/
- repository: http://github.com/sukria/Dancer
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.52
+name: Dancer
+version: 1.176
+abstract: A minimal-effort oriented web application framework
+license: perl
+author: ~
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
+ File::Basename: 0
+ File::Spec: 0
+ HTTP::Body: 0
+ HTTP::Server::Simple::PSGI: 0.11
+ MIME::Types: 0
+ Test::More: 0.87
+ URI: 0
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
Modified: trunk/libdancer-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/debian/changelog?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/debian/changelog (original)
+++ trunk/libdancer-perl/debian/changelog Wed May 5 15:05:26 2010
@@ -1,5 +1,5 @@
-libdancer-perl (1.174-1) UNRELEASED; urgency=low
+libdancer-perl (1.176-1) UNRELEASED; urgency=low
* Initial Release (Closes: #569974)
- -- Jonathan Yu <jawnsy at cpan.org> Thu, 08 Apr 2010 22:14:05 -0400
+ -- Jonathan Yu <jawnsy at cpan.org> Wed, 05 May 2010 11:38:29 -0400
Modified: trunk/libdancer-perl/lib/Dancer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer.pm (original)
+++ trunk/libdancer-perl/lib/Dancer.pm Wed May 5 15:05:26 2010
@@ -21,7 +21,7 @@
use base 'Exporter';
$AUTHORITY = 'SUKRIA';
-$VERSION = '1.174';
+$VERSION = '1.176';
@EXPORT = qw(
any
before
Modified: trunk/libdancer-perl/lib/Dancer/Config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Config.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Config.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/Config.pm Wed May 5 15:05:26 2010
@@ -140,7 +140,7 @@
=head1 NAME
-Dancer::Config
+Dancer::Config - Setting registry for Dancer
=head1 DESCRIPTION
Modified: trunk/libdancer-perl/lib/Dancer/Cookie.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Cookie.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Cookie.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/Cookie.pm Wed May 5 15:05:26 2010
@@ -40,3 +40,80 @@
}
1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Dancer::Cookie - A Dancer cookie object
+
+=head1 SYNOPSIS
+
+ use Dancer::Cookie;
+
+ my $cookie = Dancer::Cookie->new(
+ name => $cookie_name, value => $cookie_value
+ );
+
+=head1 DESCRIPTION
+
+Dancer::Cookie provides a HTTP cookie object to work with cookies.
+
+=head1 ATTRIBUTES
+
+=head3 name
+
+The cookie's name.
+
+=head3 value
+
+The cookie's value.
+
+=head2 expires
+
+The cookie's expiration date.
+
+=head2 domain
+
+The cookie's domain.
+
+=head2 path
+
+The cookie's path.
+
+=head1 METHODS/SUBROUTINES
+
+=head2 new
+
+Create a new Dancer::Cookie object.
+
+You can set any attribute described in the I<ATTRIBUTES> section above.
+
+=head2 init
+
+Runs an expiration test and sets a default path if not set.
+
+=head2 to_header
+
+Creates a proper HTTP cookie header from the content.
+
+=head2 _epoch_to_gmtstring
+
+Internal method to convert the time from Epoch to GMT.
+
+=head1 AUTHOR
+
+Alexis Sukrieh
+
+=head1 LICENSE AND COPYRIGHT
+
+Copyright 2009-2010 Alexis Sukrieh.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of either: the GNU General Public License as published
+by the Free Software Foundation; or the Artistic License.
+
+See http://dev.perl.org/licenses/ for more information.
+
Modified: trunk/libdancer-perl/lib/Dancer/Deployment.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Deployment.pod?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Deployment.pod (original)
+++ trunk/libdancer-perl/lib/Dancer/Deployment.pod Wed May 5 15:05:26 2010
@@ -110,6 +110,11 @@
+=head2 Running from Apache
+
+You can run your Dancer app from Apache using the following examples:
+
+
=head3 Running from Apache with Plack
You can run your app from Apache using PSGI (Plack), with a config like the
Modified: trunk/libdancer-perl/lib/Dancer/Error.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Error.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Error.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/Error.pm Wed May 5 15:05:26 2010
@@ -50,7 +50,6 @@
open $fh, '<', $file or return $message;
my @lines = <$fh>;
close $fh;
-
my $backtrace = $message;
@@ -123,6 +122,7 @@
warn "_censor given incorrect input: $hash";
return;
}
+
my $censored = 0;
for my $key (keys %$hash) {
if (ref $hash->{$key} eq 'HASH') {
@@ -132,6 +132,7 @@
$censored++;
}
}
+
return $censored;
}
@@ -189,3 +190,125 @@
}
1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Dancer::Error - Objects representing fatal errors
+
+=head1 SYNOPSIS
+
+ # taken from send_file:
+ use Dancer::Error;
+
+ my $error = Dancer::Error->new(
+ code => 404,
+ message => "No such file: `$path'"
+ );
+
+ Dancer::Response::set($error->render);
+
+=head1 DESCRIPTION
+
+With Dancer::Error you can throw reasonable-looking errors to the user instead
+of crashing the application and filling up the logs.
+
+This is usually used in debugging environments, and it's what Dancer uses as
+well under debugging to catch errors and show them on screen.
+
+=head1 ATTRIBUTES
+
+=head2 code
+
+The code that caused the error.
+
+This is only an attribute getter, you'll have to set it at C<new>.
+
+=head2 title
+
+The title of the error page.
+
+This is only an attribute getter, you'll have to set it at C<new>.
+
+=head2 message
+
+The message of the error page.
+
+This is only an attribute getter, you'll have to set it at C<new>.
+
+=head1 METHODS/SUBROUTINES
+
+=head2 new
+
+Create a new Dancer::Error object.
+
+=head3 title
+
+The title of the error page.
+
+=head3 type
+
+What type of error this is.
+
+=head3 code
+
+The code that caused the error.
+
+=head3 message
+
+The message that will appear to the user.
+
+=head2 backtrace
+
+Create a backtrace of the code where the error is caused.
+
+This method tries to find out where the error appeared according to the actual
+error message (using the C<message> attribute) and tries to parse it (supporting
+the regular/default Perl warning or error pattern and the L<Devel::SimpleTrace>
+output) and then returns an error-higlighted C<message>.
+
+=head2 tabulate
+
+Small subroutine to help output nicer.
+
+=head2 dumper
+
+This uses L<Data::Dumper> to create nice content output with a few predefined
+options.
+
+=head2 render
+
+Renders a response using L<Dancer::Response>.
+
+=head2 environment
+
+A main function to render environment information: the caller (using
+C<get_caller>), the settings and environment (using C<dumper>) and more.
+
+=head2 get_caller
+
+Creates a strack trace of callers.
+
+=head2 _censor
+
+An internal method that tries to censor out content which should be protected.
+
+C<dumper> calls this method to censor things like passwords and such.
+
+=head1 AUTHOR
+
+Alexis Sukrieh
+
+=head1 LICENSE AND COPYRIGHT
+
+Copyright 2009-2010 Alexis Sukrieh.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of either: the GNU General Public License as published
+by the Free Software Foundation; or the Artistic License.
+
+See http://dev.perl.org/licenses/ for more information.
+
Modified: trunk/libdancer-perl/lib/Dancer/FileUtils.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/FileUtils.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/FileUtils.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/FileUtils.pm Wed May 5 15:05:26 2010
@@ -34,3 +34,81 @@
}
'Dancer::FileUtils';
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Dancer::FileUtils - File utilities Dancer uses
+
+=head1 SYNOPSIS
+
+ use Dancer::FileUtils qw/path read_file_content/;
+
+ my $content = read_file_content( path( 'folder', 'folder', 'file' ) );
+
+=head1 DESCRIPTION
+
+Dancer::FileUtils encompasses a few utilities that relate to files which Dancer
+uses. Developers may use it instead of writing their own little subroutines or
+use additional modules.
+
+=head1 SUBROUTINES/METHODS
+
+=head2 path
+
+ use Dancer::FileUtils 'path';
+
+ my $path = path( 'folder', 'folder', 'filename');
+
+Provides comfortable path resolving, internally using L<File::Spec>.
+
+=head2 dirname
+
+ use Dancer::FileUtils 'dirname';
+
+ my $dir = dirname($path);
+
+Exposes L<File::Basename>'s I<dirname>, to allow fetching a directory name from
+a path.
+
+=head2 read_file_content
+
+ use Dancer::FileUtils 'read_file_content';
+
+ my $content = read_file_content($file);
+
+Returns either the content of a file (whose filename is the input) or I<undef>
+in case it failed to open the file.
+
+=head2 read_glob_content
+
+ use Dancer::FileUtils 'read_glob_content';
+
+ open my $fh, '<', $file or die "$!\n";
+ my $content = read_glob_content($fh);
+
+Same as I<read_file_content>, only it accepts a file handler.
+
+Returns the content and B<closes the file handler>.
+
+=head1 EXPORT
+
+Nothing by default. You can provide a list of subroutines to import.
+
+=head1 AUTHOR
+
+Alexis Sukrieh
+
+=head1 LICENSE AND COPYRIGHT
+
+Copyright 2009-2010 Alexis Sukrieh.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of either: the GNU General Public License as published
+by the Free Software Foundation; or the Artistic License.
+
+See http://dev.perl.org/licenses/ for more information.
+
Modified: trunk/libdancer-perl/lib/Dancer/HTTP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/HTTP.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/HTTP.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/HTTP.pm Wed May 5 15:05:26 2010
@@ -88,7 +88,7 @@
=head1 NAME
-Dancer::HTTP
+Dancer::HTTP - Helper for rendering HTTP status codes for Dancer
=head1 DESCRIPTION
Modified: trunk/libdancer-perl/lib/Dancer/Plugin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Plugin.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Plugin.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/Plugin.pm Wed May 5 15:05:26 2010
@@ -23,7 +23,9 @@
my $settings = setting('plugins');
- foreach ($plugin_name, $plugin_orig_name) {
+ foreach ( $plugin_name, $plugin_orig_name,
+ lc $plugin_name, lc $plugin_orig_name)
+ {
return $settings->{$_}
if ( exists $settings->{$_} );
}
Modified: trunk/libdancer-perl/lib/Dancer/Renderer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Renderer.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Renderer.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/Renderer.pm Wed May 5 15:05:26 2010
@@ -127,6 +127,8 @@
if (-f $static_file) {
open my $fh, "<", $static_file;
+ binmode $fh;
+
return Dancer::Response->new(
status => $status,
headers => ['Content-Type' => get_mime_type($static_file)],
Modified: trunk/libdancer-perl/lib/Dancer/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/lib/Dancer/Request.pm?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/lib/Dancer/Request.pm (original)
+++ trunk/libdancer-perl/lib/Dancer/Request.pm Wed May 5 15:05:26 2010
@@ -410,7 +410,7 @@
=head1 NAME
-Dancer::Request
+Dancer::Request - Interface for accessing incoming requests
=head1 DESCRIPTION
@@ -495,7 +495,7 @@
=head2 env()
-Return the current environement (C<%ENV>), as a hashref.
+Return the current environment (C<%ENV>), as a hashref.
=head2 uploads()
@@ -505,7 +505,7 @@
=head2 HTTP environment variables
-All HTTP environement variables that are in %ENV will be provided in the
+All HTTP environment variables that are in %ENV will be provided in the
Dancer::Request object through specific accessors, here are those supported:
=over 4
Modified: trunk/libdancer-perl/t/15_plugins/02_config.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdancer-perl/t/15_plugins/02_config.t?rev=57512&op=diff
==============================================================================
--- trunk/libdancer-perl/t/15_plugins/02_config.t (original)
+++ trunk/libdancer-perl/t/15_plugins/02_config.t Wed May 5 15:05:26 2010
@@ -1,7 +1,11 @@
use strict;
use warnings;
+use Dancer::ModuleLoader;
+use Test::More import => ['!pass'];
-use Test::More import => ['!pass'], tests => 5;
+plan skip_all => "YAML is needed for this test"
+ unless Dancer::ModuleLoader->load('YAML');
+plan tests => 5;
use Dancer ':syntax';
use Dancer::Config;
More information about the Pkg-perl-cvs-commits
mailing list