fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-11-10 09:27 am

[dw-free] DW/Controller/Admin.pm fails 00-compile.t

[commit: http://hg.dwscoalition.org/dw-free/rev/cf5e3742f568]

http://bugs.dwscoalition.org/show_bug.cgi?id=3182

Change from use (compiletime) to require (runtime). Remove unnecessary use
line (not actually used in the module). Tweak comments.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/DW/Controller.pm
  • cgi-bin/DW/Controller/Admin.pm
--------------------------------------------------------------------------------
diff -r 6cc9672da71b -r cf5e3742f568 cgi-bin/DW/Controller.pm
--- a/cgi-bin/DW/Controller.pm	Wed Nov 10 17:10:46 2010 +0800
+++ b/cgi-bin/DW/Controller.pm	Wed Nov 10 17:26:39 2010 +0800
@@ -19,7 +19,6 @@ use strict;
 use strict;
 use warnings;
 use Exporter;
-use DW::Routing;
 use DW::Template;
 use URI;
 
diff -r 6cc9672da71b -r cf5e3742f568 cgi-bin/DW/Controller/Admin.pm
--- a/cgi-bin/DW/Controller/Admin.pm	Wed Nov 10 17:10:46 2010 +0800
+++ b/cgi-bin/DW/Controller/Admin.pm	Wed Nov 10 17:26:39 2010 +0800
@@ -31,8 +31,10 @@ use strict;
 use strict;
 use warnings;
 use DW::Controller;
-use DW::Routing;
 use DW::Template;
+
+# this needs to be included at run time to avoid circular requirements
+require DW::Routing;
 
 my $admin_pages = {};
 
@@ -179,7 +181,7 @@ sub admin_handler {
     return DW::Template->render_template( 'admin/index.tt', $vars );
 }
 
-=head2 C<< $class->register_regex( $scope, %opts ) >>
+=head2 C<< $class->register_admin_scope( $scope, %opts ) >>
 
 Register an admin scope.
 
@@ -225,7 +227,7 @@ sub register_admin_scope {
 
 =head2 C<< $class->register_admin_page( $scope, %opts ) >>
 
-Register an admin scope.
+Register an admin page.
 
 Arguments:
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org