The attached patch is against r1657 of http://html-formfu.googlecode.com/svn/trunk/Catalyst-Controller-HTML-FormFu/lib/Catalyst/Controller/HTML/FormFu.pm

to fix fatal error message

"Modification of a read-only value attempted at ..../perl5/lib/perl5/Catalyst/Controller/HTML/FormFu.pm line 178."


Unfortunately I don't know what is the exact chain that causes a read-only value to arrive there, but I'm using the most recent FormFu inside Catalyst. If you eval

for ("foo") { s/foo/bar/; print }

you can probably see a simplified case of what happens there without the patch. I hope you accept the patch without a list of detailed steps to reproduce the bug. ;-)

--
Oskari "Okko" Ojala
178,183c178,185
<                     s{__uri_for\((.+?)\)__}
<                      { $self->{c}->uri_for( split( '\s*,\s*', $1 ) ) }eg;
<                     s{__path_to\(\s*(.+?)\s*\)__}
<                      { $self->{c}->path_to( split( '\s*,\s*', $1 ) ) }eg;
<                     s{__config\((.+?)\)__}
<                      { $self->{c}->config->{$1}  }eg;
---
>                     my $output = $_;
>                     $output =~ s{__uri_for\((.+?)\)__}
>                                 { $self->{c}->uri_for( split( '\s*,\s*', $1 ) ) }eg;
>                     $output =~ s{__path_to\(\s*(.+?)\s*\)__}
>                                 { $self->{c}->path_to( split( '\s*,\s*', $1 ) ) }eg;
>                     $output =~ s{__config\((.+?)\)__}
>                                 { $self->{c}->config->{$1}  }eg;
>                     return $output;
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to