Re: [Catalyst] Debugging Catalyst with Eclipse

2008-01-17 Thread Dmitriy S. Sinyavskiy
Hello, Nathan.
You write 17  2008 ., 18:37:19:

I'm using Eclipse IDE + EPIC to debug my Catalyst apps.
With Pad::Walker it can show values on variables even objects it's
very useful to understand insides of processing)

I'm using it in complex: internal browser, error output, debugger
In the most of cases it helps me.

What things are you interested in?

P.S. Really I'm still looking for good Perl IDE, but it still very
poor assortment.
-- 
 dreelmailto:[EMAIL PROTECTED]
 Dmitriy S. Sinyavskiy
 Web-developerPerl, Catalyst, MSSQL
 FGUE EZANTelecommunication, data transfer networks and 
devices.  


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re[2]: [Catalyst] uri_for() doesn't encode to utf8 first argument

2008-05-06 Thread Dmitriy S. Sinyavskiy
 ( @comps ) {
 
 # We pass ignore_loaded here so that overlay files for (e.g.)
@@ -1883,11 +1883,11 @@
 $component = $module,
 map {
 $_ = $class-setup_component( $_ )
-} grep { 
+} grep {
   not exists $comps{$_}
 } Devel::InnerPackage::list_packages( $component )
 );
-
+
 for my $key ( keys %modules ) {
 $class-components-{ $key } = $modules{ $key };
 }
@@ -2144,7 +2144,7 @@
 }
 
 
-=head2 $c-registered_plugins 
+=head2 $c-registered_plugins
 
 Returns a sorted list of the plugins which have either been stated in the
 import list or which have been added via C MyApp-plugin(@args); .
@@ -2276,7 +2276,7 @@
 parsing with a config parameter.
 
 MyApp-config-{parse_on_demand} = 1;
-
+
 =head1 PROXY SUPPORT
 
 Many production servers operate using the common double-server approach,
@@ -2290,9 +2290,9 @@
 the frontend and backend servers on the same machine. The following
 changes are made to the request.
 
-$c-req-address is set to the user's real IP address, as read from 
+$c-req-address is set to the user's real IP address, as read from
 the HTTP X-Forwarded-For header.
-
+
 The host value for $c-req-base and $c-req-uri is set to the real
 host, as read from the HTTP X-Forwarded-Host header.
 
@@ -2304,7 +2304,7 @@
 headers.
 
 MyApp-config-{using_frontend_proxy} = 1;
-
+
 If you do not wish to use the proxy support at all, you may set:
 
 MyApp-config-{ignore_frontend_proxy} = 1;
X-AntiVirus: checked by AntiVir MailGuard (Version: 8.0.0.18; AVE: 8.1.0.37; 
VDF: 7.0.3.243)



Test (file encoding UTF-8):
#
# unit_core_uri_for_first_arg.t
use strict;
use warnings;

use Test::More 'no_plan';
use URI;

use_ok('Catalyst');

my $request = Catalyst::Request-new( {
base = URI-new('http://127.0.0.1/foo')
} );

my $context = Catalyst-new( {
request = $request,
namespace = 'yada',
} );

# test encode first argument with utf-8,

$request-base( URI-new('http://127.0.0.1/') );

$context-namespace('');

is( Catalyst::uri_for( $context, '/animal/ёж', 'чёт', { param1 = щуп 
})-as_string,
'http://127.0.0.1/animal/%D1%91%D0%B6/%D1%87%D1%91%D1%82?param1=%C3%91%C2%89%C3%91%C2%83%C3%90%C2%BF',
'URI for undef action with first param as string in unicode'
);


-- 
 dreelmailto:[EMAIL PROTECTED]
 Dmitriy S. Sinyavskiy
 Web-developerPerl, Catalyst, MSSQL
 FGUE EZANTelecommunication, data transfer networks and 
devices.  


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re[2]: [Catalyst] uri_for() doesn't encode to utf8 first argument

2008-05-16 Thread Dmitriy S. Sinyavskiy
Hello, J..
You write 16 мая 2008 г., 4:27:07:

JS On Thu, May 15, 2008 at 11:50 PM, Dmitriy S. Sinyavskiy [EMAIL PROTECTED] 
wrote:
  So what about my patch and test?
  Is it right or someone can correct it?
  The silence is here for a week or more (



JS Jonathan Rockway asked you to regenerate without whitespace changes.

JS Just waiting on that from you to properly review it.

JS -J


It strange I haven't got received letter with this...may be deleted
by antispam (
Nevertheless I've done it now:

Index: Catalyst.pm
===
--- Catalyst.pm (revision 7759)
+++ Catalyst.pm (working copy)
@@ -948,10 +948,12 @@
 my $params =
   ( scalar @args  ref $args[$#args] eq 'HASH' ? pop @args : {} );
 
+$path =~ s!/+!/!g; # strip extra slashes '///'
+unshift(@args, split('/', $path));
 carp uri_for called with undef argument if grep { ! defined $_ } @args;
 s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
 
-unshift(@args, $path);
+
 
 unless (defined $path  $path =~ s!^/!!) { # in-place strip
 my $namespace = $c-namespace;



-- 
 dreelmailto:[EMAIL PROTECTED]
 Dmitriy S. Sinyavskiy
 Web-developerPerl, Catalyst, MSSQL
 FGUE EZANTelecommunication, data transfer networks and 
devices.  


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re[6]: [Catalyst] uri_for() doesn't encode to utf8 first argument

2008-05-23 Thread Dmitriy S. Sinyavskiy
Hello, Dmitriy.
You write 23 мая 2008 г., 23:48:56:

DSS Hello, J..
DSS You write 23 мая 2008 г., 0:18:11:

JS On Thu, May 22, 2008 at 10:05 AM, Dmitriy S. Sinyavskiy [EMAIL 
PROTECTED] wrote:

 People? what about my patch? I heven't got received any response.
 I'll be glad to now some news.
 Thanks.


JS Your mailserver is rejecting mail.  I suggest fixing your mail server
JS or viewing the list archives to make sure that you're not missing
JS things.

JS Thread:
JS http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg02771.html


DSS Test. Must be saved as UTF-8:
DSS =
DSS use strict;
DSS use warnings;

DSS use Test::More 'no_plan';
DSS use URI;

DSS use_ok('Catalyst');

DSS my $request = Catalyst::Request-new( {
base = URI-new('http://127.0.0.1/foo')
DSS } );

DSS my $context = Catalyst-new( {
request = $request,
namespace = 'yada',
DSS } );

DSS # test encode first argument with utf-8,
DSS {
$request-base( URI-new('http://127.0.0.1/') );

$context-namespace('');

DSS is( Catalyst::uri_for( $context, '/animal/ёж', 'чёт', { param1 = щуп 
})-as_string,
DSS 
'http://127.0.0.1/animal/%D1%91%D0%B6/%D1%87%D1%91%D1%82?param1=%C3%91%C2%89%C3%91%C2%83%C3%90%C2%BF',
DSS 'URI for undef action with first param as string in unicode'
DSS );
DSS }

The previous test was wrong, sorry. I've found a mistake and correct
it. Test case including check for special chars ?.

Tested today - it's working right with patch.

Test
=

use strict;
use warnings;

use Test::More 'no_plan';
use URI;

use_ok('Catalyst');

my $request = Catalyst::Request-new( {
base = URI-new('http://127.0.0.1/foo')
} );

my $context = Catalyst-new( {
request = $request,
namespace = 'yada',
} );

# test encode first argument with utf-8,
{
$request-base( URI-new('http://127.0.0.1/') );

$context-namespace('');

is( Catalyst::uri_for( $context, '/animal/ёж', 'чёт', { param1 = щуп 
})-as_string,
'http://127.0.0.1/animal/%D1%91%D0%B6/%D1%87%D1%91%D1%82?param1=%D1%89%D1%83%D0%BF',
'URI for with first param as string in unicode'
);

is( Catalyst::uri_for( $context, '/??', '?', { param1 = ? })-as_string,
'http://127.0.0.1/%3F%3F/%3F?param1=%3F',
'URI for with special char ? in args and param'
);

}




-- 
 dreelmailto:[EMAIL PROTECTED]
 Dmitriy S. Sinyavskiy
 Web-developerPerl, Catalyst, MSSQL
 FGUE EZANTelecommunication, data transfer networks and 
devices.  


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/