Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel
update_from_pod breakage
 

Index | Next | Previous | View Flat


adrian at gossamer-threads

Mar 17, 2009, 1:53 PM


Views: 1134
Permalink
update_from_pod breakage

Not 100% sure how this is supposed to work, but it's been dying for me,
if I give it pod like:

=begin foo


=bar

This is a bar field

=end foo

The extra new line between the "=begin foo" and "=bar" cause it to die.
I believe the following patch fixes it. Still passes make devtest,
and I guess we need to add more tests for stuff like this.


--- lib/Bric/Biz/Element/Container.pm (revision 8506)
+++ lib/Bric/Biz/Element/Container.pm (working copy)
@@ -2611,6 +2611,12 @@
else {
$kn = $def_field;
$field_type = $field_types{$kn};
+
+ # we weren't expecting this default field *here*,
+ # so just ignore it
+ if (not defined $field_type) {
+ next POD;
+ }
my $field_occurrence =
$self->get_field_occurrence($field_type->get_key_name);
my $max_occur = $field_type->get_max_occurrence;
if (defined $field_type && $field_ord{$kn} &&
$max_occur && $field_occurrence > $max_occur) {
@@ -2637,12 +2643,6 @@
last DEF_FIELD if $line =~ /^\s*$/;
($content .= "$line\n") =~ s/^$indent//mg;
}
-
- # we weren't expecting this default field *here*,
- # so just ignore it
- if (not defined $field_type) {
- next POD;
- }
}

# Fix up the content.

Subject User Time
update_from_pod breakage adrian at gossamer-threads Mar 17, 2009, 1:53 PM
    Re: update_from_pod breakage david at kineticode Mar 17, 2009, 2:15 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.