The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
Changes 03
MANIFEST 01
META.json 23
META.yml 026
Makefile.PL 13
README 11
lib/Pod/Elemental/Autoblank.pm 22
lib/Pod/Elemental/Autochomp.pm 22
lib/Pod/Elemental/Command.pm 22
lib/Pod/Elemental/Document.pm 22
lib/Pod/Elemental/Element/Generic/Blank.pm 22
lib/Pod/Elemental/Element/Generic/Command.pm 22
lib/Pod/Elemental/Element/Generic/Nonpod.pm 22
lib/Pod/Elemental/Element/Generic/Text.pm 22
lib/Pod/Elemental/Element/Nested.pm 22
lib/Pod/Elemental/Element/Pod5/Command.pm 22
lib/Pod/Elemental/Element/Pod5/Data.pm 22
lib/Pod/Elemental/Element/Pod5/Nonpod.pm 22
lib/Pod/Elemental/Element/Pod5/Ordinary.pm 22
lib/Pod/Elemental/Element/Pod5/Region.pm 38
lib/Pod/Elemental/Element/Pod5/Verbatim.pm 22
lib/Pod/Elemental/Flat.pm 22
lib/Pod/Elemental/Node.pm 22
lib/Pod/Elemental/Objectifier.pm 22
lib/Pod/Elemental/Paragraph.pm 22
lib/Pod/Elemental/Selectors.pm 22
lib/Pod/Elemental/Transformer/Gatherer.pm 22
lib/Pod/Elemental/Transformer/Nester.pm 22
lib/Pod/Elemental/Transformer/Pod5.pm 22
lib/Pod/Elemental/Transformer.pm 22
lib/Pod/Elemental/Types.pm 22
lib/Pod/Elemental.pm 22
t/eg/Simple.pm 11
t/pod5/for-begin.t 132
34 files changed (This is a version diff) 59128
@@ -1,5 +1,8 @@
 Revision history for Pod-Elemental
 
+0.093280  2009-11-24 18:37:04 America/New_York
+          emit a =begin/=end pair instead of =for in more cases where required
+
 0.093000  2009-10-27
           correct a regex is format region parsing to allow multiline =for
 
@@ -2,6 +2,7 @@ Changes
 LICENSE
 MANIFEST
 META.json
+META.yml
 Makefile.PL
 README
 dist.ini
@@ -6,8 +6,8 @@
       "version" : 1.4,
       "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
    },
-   "generated_by" : "Dist::Zilla version 1.092990",
-   "version" : "0.093000",
+   "generated_by" : "Dist::Zilla version 1.093220",
+   "version" : "0.093280",
    "name" : "Pod-Elemental",
    "author" : [
       "Ricardo SIGNES <rjbs@cpan.org>"
@@ -29,3 +29,4 @@
    },
    "abstract" : "work with nestable Pod elements"
 }
+
@@ -0,0 +1,26 @@
+---
+abstract: 'work with nestable Pod elements'
+author:
+  - 'Ricardo SIGNES <rjbs@cpan.org>'
+generated_by: 'Dist::Zilla version 1.093220'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: Pod-Elemental
+requires:
+  Encode: 0
+  Mixin::Linewise::Readers: 0
+  Moose: 0
+  Moose::Autobox: 0.10
+  MooseX::Types: 0
+  Pod::Eventual::Simple: 0.004
+  String::RewritePrefix: 0
+  String::Truncate: 0
+  Sub::Exporter::ForMethods: 0
+  Test::Deep: 0
+  Test::Differences: 0
+  namespace::autoclean: 0
+resources:
+  repository: http://github.com/rjbs/pod-elemental
+version: 0.093280
@@ -2,6 +2,8 @@
 use strict;
 use warnings;
 
+
+
 use ExtUtils::MakeMaker;
 
 WriteMakefile(
@@ -9,7 +11,7 @@ WriteMakefile(
   NAME      => 'Pod::Elemental',
   AUTHOR    => "Ricardo\ SIGNES\ \<rjbs\@cpan\.org\>",
   ABSTRACT  => "work\ with\ nestable\ Pod\ elements",
-  VERSION   => '0.093000',
+  VERSION   => '0.093280',
   EXE_FILES => [ qw() ],
   (eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
   PREREQ_PM    => {
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Pod-Elemental, version
-0.093000:
+0.093280:
 
   work with nestable Pod elements
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Autoblank;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use namespace::autoclean;
@@ -24,7 +24,7 @@ Pod::Elemental::Autoblank - a paragraph that always displays an extra blank line
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Autochomp;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use namespace::autoclean;
@@ -25,7 +25,7 @@ Pod::Elemental::Autochomp - a paragraph that chomps set content
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Command;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose::Role;
@@ -36,7 +36,7 @@ Pod::Elemental::Command - a =command paragraph
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Document;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -112,7 +112,7 @@ Pod::Elemental::Document - a pod document
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Generic::Blank;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -22,7 +22,7 @@ Pod::Elemental::Element::Generic::Blank - a series of blank lines
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Generic::Command;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -29,7 +29,7 @@ Pod::Elemental::Element::Generic::Command - a Pod =command element
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Generic::Nonpod;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -20,7 +20,7 @@ Pod::Elemental::Element::Generic::Nonpod - a non-pod element in a Pod document
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Generic::Text;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -20,7 +20,7 @@ Pod::Elemental::Element::Generic::Text - a Pod text or verbatim element
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Nested;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -38,7 +38,7 @@ Pod::Elemental::Element::Nested - an element that is a command and a node
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Pod5::Command;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -23,7 +23,7 @@ Pod::Elemental::Element::Pod5::Command - a Pod5 =command element
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Pod5::Data;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -20,7 +20,7 @@ Pod::Elemental::Element::Pod5::Data - a Pod data paragraph
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Pod5::Nonpod;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -26,7 +26,7 @@ Pod::Elemental::Element::Pod5::Nonpod - a non-pod element in a Pod document
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Pod5::Ordinary;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -22,7 +22,7 @@ Pod::Elemental::Element::Pod5::Ordinary - a Pod5 ordinary text paragraph
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Pod5::Region;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 # ABSTRACT: a region of Pod (this role likely to be removed)
@@ -28,12 +28,17 @@ sub closing_command { 'end' }
 sub _display_as_for {
   my ($self) = @_;
 
+  # Everything after "=for target" becomes the lone child paragraph, so there
+  # is nowhere to put the (technically illegal) content. -- rjbs, 2009-11-24
   return if $self->content =~ /\S/;
+
+  # We can't have more than one paragraph, because there'd be a blank, so we
+  # couldn't round trip. -- rjbs, 2009-11-24
   return if $self->children->length != 1;
 
   my $child = $self->children->[0];
 
-  return if $child->content =~ /\n\S/;
+  return if $child->content =~ m{^\s*$}m;
 
   my $base = 'Pod::Elemental::Element::Pod5::';
   return 1 if   $self->is_pod and $child->isa("${base}Ordinary");
@@ -123,7 +128,7 @@ Pod::Elemental::Element::Pod5::Region - a region of Pod (this role likely to be
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Element::Pod5::Verbatim;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -22,7 +22,7 @@ Pod::Elemental::Element::Pod5::Verbatim - a Pod verbatim paragraph
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Flat;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose::Role;
@@ -33,7 +33,7 @@ Pod::Elemental::Flat - a content-only pod paragraph
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Node;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose::Role;
@@ -47,7 +47,7 @@ Pod::Elemental::Node - a thing with Pod::Elemental::Nodes as children
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Objectifier;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -65,7 +65,7 @@ Pod::Elemental::Objectifier - it turns a Pod::Eventual event stream into objects
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Paragraph;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use namespace::autoclean;
@@ -46,7 +46,7 @@ Pod::Elemental::Paragraph - a paragraph in a Pod document
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 package Pod::Elemental::Selectors;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 # ABSTRACT: predicates for selecting elements
@@ -70,7 +70,7 @@ Pod::Elemental::Selectors - predicates for selecting elements
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Transformer::Gatherer;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -57,7 +57,7 @@ Pod::Elemental::Transformer::Gatherer - gather related paragraphs under a shared
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Transformer::Nester;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -91,7 +91,7 @@ Pod::Elemental::Transformer::Nester - group the document into sections
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Transformer::Pod5;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -247,7 +247,7 @@ Pod::Elemental::Transformer::Pod5 - the default, minimal semantics of Perl5's po
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 SYNOPSIS
 
@@ -1,5 +1,5 @@
 package Pod::Elemental::Transformer;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose::Role;
@@ -22,7 +22,7 @@ Pod::Elemental::Transformer - something that transforms a node tree into a new t
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 package Pod::Elemental::Types;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 # ABSTRACT: data types for Pod::Elemental
@@ -27,7 +27,7 @@ Pod::Elemental::Types - data types for Pod::Elemental
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 OVERVIEW
 
@@ -1,5 +1,5 @@
 package Pod::Elemental;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 use Moose;
@@ -70,7 +70,7 @@ Pod::Elemental - work with nestable Pod elements
 
 =head1 VERSION
 
-version 0.093000
+version 0.093280
 
 =head1 SYNOPSIS
 
@@ -1,6 +1,6 @@
 use strict;
 package Simple;
-our $VERSION = '0.093000';
+our $VERSION = '0.093280';
 
 
 # ABSTRACT: this is just a test
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 9;
+use Test::More tests => 10;
 
 use Pod::Elemental;
 use Pod::Elemental::Transformer::Pod5;
@@ -120,6 +120,37 @@ is(
   "Region with content & children is =begin/=end",
 );
 
+### a region with para with blanks should become =begin, not =for
+{
+  my $begin_with_content_blanks = Pod::Elemental::Element::Pod5::Region->new({
+    format_name => 'test',
+    is_pod      => 0,
+    content     => "\n",
+    children    => [
+      Pod::Elemental::Element::Pod5::Data->new({
+        content => "Ordinary\n \n paragraph.",
+      }),
+    ],
+  });
+
+  my $expected = <<'END_FOR';
+=begin test
+
+Ordinary
+ 
+ paragraph.
+
+=end test
+
+END_FOR
+
+  is(
+    $begin_with_content_blanks->as_pod_string,
+    $expected,
+    "region with 1 child that has blanks is =begin",
+  );
+}
+
 ### =for
 my $for = Pod::Elemental::Element::Pod5::Region->new({
   format_name => 'test',