diff -Nru libhtml-formfu-model-dbic-perl-2.00/Changes libhtml-formfu-model-dbic-perl-2.03/Changes
--- libhtml-formfu-model-dbic-perl-2.00/Changes 2014-05-05 13:19:42.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/Changes 2018-04-09 21:56:30.000000000 +0000
@@ -1,3 +1,17 @@
+2.03 2018-04-09 21:56:26+00:00 UTC
+
+ - New 'expand_stash_dots' config option
+
+ - remove bundled/renamed MooseX::Attribute::Chained and depend on the
+ fixed version
+
+2.02 2016-06-24
+
+ - documentation fixes
+
+ - build and packaging tweaks, including travis CI config, additional
+ author tests, packaging etc
+
2.00 2014-05-05
- switch from MooseX::Attribute::Chained to MooseX::Attribute::FormFuChained
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/changelog libhtml-formfu-model-dbic-perl-2.03/debian/changelog
--- libhtml-formfu-model-dbic-perl-2.00/debian/changelog 2016-02-22 07:45:16.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/changelog 2018-05-14 19:15:46.000000000 +0000
@@ -1,3 +1,33 @@
+libhtml-formfu-model-dbic-perl (2.03-2) unstable; urgency=medium
+
+ * Add missing version on MooseX::Attribute::Chained dependency
+
+ -- Florian Schlichting Mon, 14 May 2018 21:15:46 +0200
+
+libhtml-formfu-model-dbic-perl (2.03-1) unstable; urgency=medium
+
+ [ gregor herrmann ]
+ * debian/copyright: change Copyright-Format 1.0 URL to HTTPS.
+ * Remove Brian Cassidy from Uploaders. Thanks for your work!
+
+ [ Florian Schlichting ]
+ * Add upstream metadata
+ * New upstream release: 2.02
+ * Update copyright years
+ * Drop whatis-entries.diff, applied upstream
+
+ [ Salvatore Bonaccorso ]
+ * Update Vcs-* headers for switch to salsa.debian.org
+
+ [ Florian Schlichting ]
+ * Import upstream version 2.03
+ * Update upstream metadata
+ * Refresh how-to-report-bugs.diff (offset)
+ * Declare compliance with Debian Policy 4.1.4
+ * Re-add libmoosex-attribute-chained-perl dependency
+
+ -- Florian Schlichting Mon, 14 May 2018 16:31:15 +0200
+
libhtml-formfu-model-dbic-perl (2.00-2) unstable; urgency=medium
* Team upload
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/control libhtml-formfu-model-dbic-perl-2.03/debian/control
--- libhtml-formfu-model-dbic-perl-2.00/debian/control 2016-02-22 07:44:32.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/control 2018-05-14 19:14:51.000000000 +0000
@@ -1,7 +1,6 @@
Source: libhtml-formfu-model-dbic-perl
Maintainer: Debian Perl Group
Uploaders: Ansgar Burchardt ,
- Brian Cassidy ,
gregor herrmann ,
Florian Schlichting
Section: perl
@@ -15,13 +14,14 @@
libdbix-class-perl,
libhtml-formfu-perl (>= 2.00000),
liblist-moreutils-perl,
+ libmoosex-attribute-chained-perl (>= 1.0.2),
libsql-translator-perl,
libtask-weaken-perl,
perl (>= 5.19.5) | libtest-simple-perl (>= 0.99),
libyaml-syck-perl
-Standards-Version: 3.9.7
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libhtml-formfu-model-dbic-perl.git
-Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libhtml-formfu-model-dbic-perl.git
+Standards-Version: 4.1.4
+Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libhtml-formfu-model-dbic-perl
+Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libhtml-formfu-model-dbic-perl.git
Homepage: http://www.formfu.org/
Package: libhtml-formfu-model-dbic-perl
@@ -32,6 +32,7 @@
libdbix-class-perl,
libhtml-formfu-perl (>= 2.00000),
liblist-moreutils-perl,
+ libmoosex-attribute-chained-perl (>= 1.0.2),
libtask-weaken-perl
Description: module to integrate HTML::FormFu with DBIx::Class
HTML::FormFu is a HTML form creation, rendering and validation framework.
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/copyright libhtml-formfu-model-dbic-perl-2.03/debian/copyright
--- libhtml-formfu-model-dbic-perl-2.00/debian/copyright 2016-02-22 07:44:32.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/copyright 2016-10-09 22:25:06.000000000 +0000
@@ -1,15 +1,15 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: HTML-FormFu-Model-DBIC
Upstream-Contact: Carl Franks
Source: https://metacpan.org/release/HTML-FormFu-Model-DBIC
Files: *
-Copyright: 2013, Carl Franks
+Copyright: 2016, Carl Franks
License: Artistic or GPL-1+
Files: debian/*
Copyright: 2008-2011, Ansgar Burchardt
- 2013, Florian Schlichting
+ 2013-2016, Florian Schlichting
License: Artistic or GPL-1+
License: Artistic
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/patches/how-to-report-bugs.diff libhtml-formfu-model-dbic-perl-2.03/debian/patches/how-to-report-bugs.diff
--- libhtml-formfu-model-dbic-perl-2.00/debian/patches/how-to-report-bugs.diff 2016-02-22 07:44:32.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/patches/how-to-report-bugs.diff 2018-05-14 14:29:38.000000000 +0000
@@ -4,19 +4,18 @@
--- a/lib/HTML/FormFu/Model/DBIC.pm
+++ b/lib/HTML/FormFu/Model/DBIC.pm
-@@ -1885,9 +1885,13 @@
+@@ -1952,9 +1952,13 @@
=head1 BUGS
--Please submit bugs / feature requests to
--L (preferred) or
--L.
+-Please submit bugs / feature requests to
+Please submit bug reports to the Debian Bug Tracker. You can use
+L to do so interactively. A list of reported bugs can be found
+at L.
+
+For upstream bug reports / feature requests look at
-+L (preferred) or
+ L (preferred) or
+-L.
+L.
=head1 GITHUB REPOSITORY
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/patches/series libhtml-formfu-model-dbic-perl-2.03/debian/patches/series
--- libhtml-formfu-model-dbic-perl-2.00/debian/patches/series 2016-02-22 07:51:05.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/patches/series 2016-10-09 22:29:10.000000000 +0000
@@ -1,2 +1 @@
how-to-report-bugs.diff
-whatis-entries.diff
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/patches/whatis-entries.diff libhtml-formfu-model-dbic-perl-2.03/debian/patches/whatis-entries.diff
--- libhtml-formfu-model-dbic-perl-2.00/debian/patches/whatis-entries.diff 2016-02-22 07:44:32.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/patches/whatis-entries.diff 1970-01-01 00:00:00.000000000 +0000
@@ -1,16 +0,0 @@
-From: Ansgar Burchardt
-Date: Tue, 12 Oct 2010 18:14:39 +0200
-Subject: Add whatis entries to man pages
-Forwarded: https://github.com/fireartist/HTML-FormFu-Model-DBIC/pull/6/files
-
---- a/lib/HTML/FormFu/Constraint/DBIC/Unique.pm
-+++ b/lib/HTML/FormFu/Constraint/DBIC/Unique.pm
-@@ -161,7 +161,7 @@
-
- =head1 NAME
-
--HTML::FormFu::Constraint::DBIC::Unique
-+HTML::FormFu::Constraint::DBIC::Unique - unique constraint for HTML::FormFu::Model::DBIC
-
- =head1 SYNOPSIS
-
diff -Nru libhtml-formfu-model-dbic-perl-2.00/debian/upstream/metadata libhtml-formfu-model-dbic-perl-2.03/debian/upstream/metadata
--- libhtml-formfu-model-dbic-perl-2.00/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/debian/upstream/metadata 2018-05-14 14:28:32.000000000 +0000
@@ -0,0 +1,6 @@
+---
+Archive: CPAN
+Contact: Carl Franks
+Name: HTML-FormFu-Model-DBIC
+Repository: https://github.com/FormFu/HTML-FormFu-Model-DBIC.git
+Repository-Browse: https://github.com/FormFu/HTML-FormFu-Model-DBIC
diff -Nru libhtml-formfu-model-dbic-perl-2.00/dist.ini libhtml-formfu-model-dbic-perl-2.03/dist.ini
--- libhtml-formfu-model-dbic-perl-2.00/dist.ini 2014-05-05 13:19:42.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/dist.ini 2018-04-09 21:56:30.000000000 +0000
@@ -2,9 +2,7 @@
author = Carl Franks
license = Perl_5
copyright_holder = Carl Franks
-copyright_year = 2013
-
-version = 2.00
+copyright_year = 2016
[Prereqs]
perl = 5.008001
@@ -12,6 +10,7 @@
DBIx::Class = 0.08108
HTML::FormFu = 2.00
List::MoreUtils = 0
+MooseX::Attribute::Chained = 1.0.2
Storable = 0
Task::Weaken = 0 ; make sure Scalar::Util has weaken()
@@ -24,14 +23,42 @@
[Prereqs / DevelopRequires]
Test::Pod = 0
-[PodCoverageTests]
-[PodSyntaxTests]
-
-[PkgVersion]
-
-[NextRelease]
-format = %v %{yyyy-MM-dd}d
-
-[Repository]
-
-[@Basic]
+;; --
+;; -- Sets of additional tests we want to do as part of release
+[Test::Perl::Critic]
+[MetaTests]
+;; [PodCoverageTests] ; Currently we comprehensively fail these
+[OurPkgVersion]
+[PodVersion]
+[Test::Kwalitee]
+[Test::EOL]
+finder = :InstallModules ; prevents test inputs being flagged
+[Test::PAUSE::Permissions] ; if doing a release make sure we have PAUSE perms
+
+;; -- Additional information
+[GithubMeta] ; Grab the repo metadata
+[NextRelease] ; Mark up the next release in changes
+
+;; -- Additional git
+[Git::GatherDir]
+[Git::NextVersion] ; Get the next version tag from git
+[Git::CheckFor::CorrectBranch] ; ensure on master branch for release
+[Git::Remote::Check] ; ensure our branch is ahead of remote
+
+;; -- We base the release stuff on the starter module, and tweak a bit
+[@Starter]
+-remove = GatherDir ; this is replaced by [Git::GatherDir]
+ReadmeAnyFromPod.source_filename = lib/HTML/FormFu/Model/DBIC.pm
+
+[ReadmeAnyFromPod / Pod_Readme]
+type = pod
+location = root ; do not include pod readmes in the build!
+
+[@Git]
+changelog = Changes
+allow_dirty = dist.ini
+allow_dirty = README.pod
+allow_dirty = Changes
+commit_msg = v%v%t - %d%n%n%c
+tag_format = v%v%t ; see Git::Tag
+tag_message = v%v%t - %d ; see Git::Tag
\ No newline at end of file
diff -Nru libhtml-formfu-model-dbic-perl-2.00/lib/HTML/FormFu/Constraint/DBIC/Unique.pm libhtml-formfu-model-dbic-perl-2.03/lib/HTML/FormFu/Constraint/DBIC/Unique.pm
--- libhtml-formfu-model-dbic-perl-2.00/lib/HTML/FormFu/Constraint/DBIC/Unique.pm 2014-05-05 13:19:42.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/lib/HTML/FormFu/Constraint/DBIC/Unique.pm 2018-04-09 21:56:30.000000000 +0000
@@ -1,7 +1,10 @@
package HTML::FormFu::Constraint::DBIC::Unique;
-$HTML::FormFu::Constraint::DBIC::Unique::VERSION = '2.00';
+
+use strict;
+our $VERSION = '2.03'; # VERSION
+
use Moose;
-use MooseX::Attribute::FormFuChained;
+use MooseX::Attribute::Chained;
extends 'HTML::FormFu::Constraint';
@@ -9,13 +12,13 @@
use HTML::FormFu::Util qw( DEBUG_CONSTRAINTS debug );
-has model => ( is => 'rw', traits => ['FormFuChained'] );
-has resultset => ( is => 'rw', traits => ['FormFuChained'] );
-has column => ( is => 'rw', traits => ['FormFuChained'] );
-has method_name => ( is => 'rw', traits => ['FormFuChained'] );
-has self_stash_key => ( is => 'rw', traits => ['FormFuChained'] );
-has others => ( is => 'rw', traits => ['FormFuChained'] );
-has id_field => ( is => 'rw', traits => ['FormFuChained'] );
+has model => ( is => 'rw', traits => ['Chained'] );
+has resultset => ( is => 'rw', traits => ['Chained'] );
+has column => ( is => 'rw', traits => ['Chained'] );
+has method_name => ( is => 'rw', traits => ['Chained'] );
+has self_stash_key => ( is => 'rw', traits => ['Chained'] );
+has others => ( is => 'rw', traits => ['Chained'] );
+has id_field => ( is => 'rw', traits => ['Chained'] );
sub constrain_value {
my ( $self, $value ) = @_;
@@ -30,9 +33,9 @@
}
}
- # get stash
+ # get stash
my $stash = $self->form->stash;
-
+
my $schema;
if ( defined $stash->{schema} ) {
@@ -70,13 +73,13 @@
if ( defined( my $self_stash = $stash->{ $self_stash_key } ) ) {
my ($pk) = $resultset->result_source->primary_columns;
-
+
$pk_val = $self_stash->$pk;
}
}
return $resultset->$method_name( $value, $pk_val );
- }
+ }
else {
my $column = $self->column || $self->parent->name;
@@ -84,7 +87,7 @@
if ( $self->others ) {
my @others = ref $self->others ? @{ $self->others }
: $self->others;
-
+
my $params = $self->form->input;
%others =
@@ -94,28 +97,28 @@
map {
$_ => $self->get_nested_hash_value( $params, $_ )
} @others;
-
+
}
-
+
my $existing_row = eval {
$resultset->find( { %others, $column => $value } );
};
-
+
if ( my $error = $@ ) {
# warn and die, as errors are swallowed by HTML-FormFu
carp $error;
croak $error;
}
-
+
# if a row exists, first check whether it matches a known object on the
# form stash
-
+
if ( $existing_row && defined( my $self_stash_key = $self->self_stash_key ) ) {
-
+
if ( defined( my $self_stash = $stash->{ $self_stash_key } ) ) {
-
+
my ($pk) = $resultset->result_source->primary_columns;
-
+
if ( $existing_row->$pk eq $self_stash->$pk ) {
return 1;
}
@@ -128,7 +131,7 @@
return ($existing_row->$pk eq $value);
}
}
-
+
return !$existing_row;
}
@@ -136,11 +139,11 @@
after repeatable_repeat => sub {
my ( $self, $repeatable, $new_block ) = @_;
-
+
# rename any 'id_field' fields
if ( my $id_field = $self->id_field ) {
my $block_fields = $new_block->get_fields;
-
+
my $field = $repeatable->get_field_with_original_name( $id_field, $block_fields );
if ( defined $field ) {
@@ -161,11 +164,15 @@
=head1 NAME
-HTML::FormFu::Constraint::DBIC::Unique
+HTML::FormFu::Constraint::DBIC::Unique - unique constraint for HTML::FormFu::Model::DBIC
+
+=head1 VERSION
+
+version 2.03
=head1 SYNOPSIS
- $form->stash->{schema} = $dbic_schema; # DBIC schema
+ $form->stash->{schema} = $dbic_schema; # DBIC schema
$form->element('text')
->name('email')
@@ -192,7 +199,7 @@
or in a config file:
---
- elements:
+ elements:
- type: text
name: email
constraints:
@@ -201,7 +208,7 @@
model: DBIC::User
- type: text
name: user
- constraints:
+ constraints:
- Required
- type: DBIC::Unique
model: DBIC::User
@@ -225,7 +232,7 @@
=head2 self_stash_key
reference to a key in the form stash. if this key exists, the constraint
-will check if the id matches the one of this element, so that you can
+will check if the id matches the one of this element, so that you can
use your own name.
=head2 id_field
@@ -257,13 +264,13 @@
'category' and 'value', use a config file such as this:
---
- elements:
+ elements:
- type: Text
name: category
label: Category
constraints:
- Required
-
+
- type: Text
name: value
label: Value
@@ -277,14 +284,14 @@
Name of a method which will be called on the resultset. The method is passed
two argument; the value of the field, and the primary key value (usually `id`)
-of the record in the form stash (as defined by self_stash_key). An example
+of the record in the form stash (as defined by self_stash_key). An example
config might be:
---
- elements:
+ elements:
- type: text
name: user
- constraints:
+ constraints:
- Required
- type: DBIC::Unique
model: DBIC::User
diff -Nru libhtml-formfu-model-dbic-perl-2.00/lib/HTML/FormFu/Model/DBIC.pm libhtml-formfu-model-dbic-perl-2.03/lib/HTML/FormFu/Model/DBIC.pm
--- libhtml-formfu-model-dbic-perl-2.00/lib/HTML/FormFu/Model/DBIC.pm 2014-05-05 13:19:42.000000000 +0000
+++ libhtml-formfu-model-dbic-perl-2.03/lib/HTML/FormFu/Model/DBIC.pm 2018-04-09 21:56:30.000000000 +0000
@@ -1,13 +1,15 @@
package HTML::FormFu::Model::DBIC;
-$HTML::FormFu::Model::DBIC::VERSION = '2.00';
+
use strict;
use warnings;
use base 'HTML::FormFu::Model';
+our $VERSION = '2.03'; # VERSION
+
use HTML::FormFu::Util qw( _merge_hashes );
use List::MoreUtils qw( none notall );
use List::Util qw( first );
-use Scalar::Util qw( blessed );
+use Scalar::Util qw( blessed reftype );
use Storable qw( dclone );
use Carp qw( croak );
@@ -59,8 +61,12 @@
: {}; # avoid overwriting attrs->{condition}
for my $name ( keys %$from_stash ) {
croak "config value must not be a reference" if ref $from_stash->{$name};
- my $value = $form->stash->{ $from_stash->{$name} };
- $condition->{$name} = $value;
+ if ( $attrs->{expand_stash_dots} ) {
+ $condition->{$name} = $self->_get_stash_value( $form->stash, $from_stash->{$name} );
+ }
+ else {
+ $condition->{$name} = $form->stash->{ $from_stash->{$name} };
+ }
}
}
@@ -92,6 +98,30 @@
return @defaults;
}
+sub _get_stash_value {
+ my ( $self, $stash, $key ) = @_;
+ my $base = $stash;
+
+ if ( $key =~ /\./ ) {
+ for my $part ( grep {length} split qr/\./, $key ) {
+ if ( blessed($base) && $base->can($part) ) {
+ $base = $base->$part;
+ }
+ elsif ( 'HASH' eq reftype($base) ) {
+ $base = $base->{$part};
+ }
+ elsif ( 'ARRAY' eq reftype($base) && $key =~ /^[0-9]+\z/ ) {
+ $base = $base->[$key];
+ }
+ else {
+ croak "don't know what to do with part '$part' in key '$key'";
+ }
+ }
+ }
+
+ return $base;
+}
+
sub _get_resultset {
my ( $base, $form, $attrs ) = @_;
@@ -352,7 +382,7 @@
my $schema = $form->stash->{schema}
or croak 'schema required on form stash, if no row object provided';
- my $resultset
+ my $resultset
= $attrs->{resultset}
|| $base->model_config->{resultset}
|| $form->model_config->{resultset}
@@ -591,19 +621,19 @@
sub _save_combobox {
my ( $self, $base, $dbic, $form, $rs, $combo, $rel, $attrs ) = @_;
-
+
my $select = $combo->get_field({ type => 'Select' });
my $text = $combo->get_field({ type => 'Text' });
-
+
my $select_value = $form->param( $select->nested_name );
my $text_value = $form->param( $text->nested_name );
-
+
my $target_rs = $dbic->result_source->related_source( $rel )->resultset;
my $target;
-
+
if ( defined $select_value && length $select_value ) {
my $pk_name = $combo->model_config->{select_column};
-
+
$target = $target_rs->find(
{
$pk_name => $select_value,
@@ -612,14 +642,14 @@
}
else {
my $column_name = $combo->model_config->{text_column};
-
+
$target = $target_rs->create(
{
$column_name => $text_value,
},
);
}
-
+
$dbic->set_from_related( $rel, $target );
$dbic->update;
}
@@ -818,7 +848,7 @@
) or $field->model_config->{null_if_empty} )
# comparing to '' does not work for inflated objects
- && !ref $value
+ && !ref $value
&& $value eq ''
)
{
@@ -852,12 +882,12 @@
my $accessor = $config->{accessor} || $name;
next if not defined $accessor;
-
- my $value = ( $dbic->result_source->has_column($accessor)
+
+ my $value = ( $dbic->result_source->has_column($accessor)
and exists $dbic->result_source->column_info($accessor)->{is_array} )
? $form->param_array( $field->nested_name )
: $form->param_value( $field->nested_name ) ;
-
+
next
if $config->{ignore_if_empty}
&& ( !defined $value || $value eq "" );
@@ -895,7 +925,8 @@
$dbic->can($accessor)
# and $accessor is not a has_one or might_have rel where the foreign key is on the foreign table
- and !$dbic->result_source->relationship_info($accessor) )
+ and !$dbic->result_source->relationship_info($accessor)
+ and !$dbic->can( 'add_to_' . $accessor ) )
{
$dbic->$accessor($value);
}
@@ -1044,7 +1075,7 @@
my $is_new;
my $config = $block->model_config;
- my $new_rows_max
+ my $new_rows_max
= $config->{new_rows_max}
|| $config->{empty_rows}
|| 0;
@@ -1139,32 +1170,36 @@
HTML::FormFu::Model::DBIC - Integrate HTML::FormFu with DBIx::Class
+=head1 VERSION
+
+version 2.03
+
=head1 SYNOPSIS
Example of typical use in a Catalyst controller:
sub edit : Chained {
my ( $self, $c ) = @_;
-
+
my $form = $c->stash->{form};
my $book = $c->stash->{book};
-
+
if ( $form->submitted_and_valid ) {
-
+
# update dbic row with submitted values from form
-
+
$form->model->update( $book );
-
+
$c->response->redirect( $c->uri_for('view', $book->id) );
return;
}
elsif ( !$form->submitted ) {
-
+
# use dbic row to set form's default values
-
+
$form->model->default_values( $book );
}
-
+
return;
}
@@ -1234,7 +1269,7 @@
---
model_config:
resultset: FooTable
-
+
elements:
# [snip]
@@ -1277,20 +1312,20 @@
package MySchema::Book;
use base 'DBIx::Class';
-
+
__PACKAGE__->load_components(qw/ Core /);
-
+
__PACKAGE__->table("book");
-
+
__PACKAGE__->add_columns(
id => { data_type => "INTEGER" },
title => { data_type => "TEXT" },
author => { data_type => "TEXT" },
blurb => { data_type => "TEXT" },
);
-
+
__PACKAGE__->set_primary_key("id");
-
+
1;
A suitable form for this might be:
@@ -1298,18 +1333,18 @@
elements:
- type: Text
name: title
-
+
- type: Text
name: author
-
+
- type: Textarea
name: blurb
=head2 might_have and has_one relationships
-Set field values from a related row with a C or C
-relationship by placing the fields within a
-L (or any element that inherits from
+Set field values from a related row with a C or C
+relationship by placing the fields within a
+L (or any element that inherits from
Block, such as L