Fixed minor installation and documentation issues
Rob Kinyon [Wed, 8 Dec 2004 18:22:04 +0000 (18:22 +0000)]
Changes
MANIFEST.SKIP
META.yml
Makefile.PL
README
lib/Excel/Template.pm
lib/Excel/Template/Element/Backref.pm

diff --git a/Changes b/Changes
index 672b94b..49b75be 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,11 @@
 Revision history for Perl distribution Excel::Template
 
+0.19 Wed Dec 08 12:00:00 2004
+    - Fixed META.yml
+    - Added more values to the MANIFEST.SKIP
+    - Fixed PM_FILTER to work on Win32 (Thanks, Corion!)
+    - Improved POD
+
 0.18 Fri Nov 12 14:45:00 2004
     - Removed 'use warnings' from all tests
     - All warnings are suppressed unless $^W is true
index 6a5b467..cf01ce5 100644 (file)
@@ -7,8 +7,9 @@
 ^MANIFEST\.
 ^Makefile$
 ^pm_to_blib$
-^blib/
+^blib/?
 ^MakeMaker-\d
+^blibdirs$
 
 # Temp, old and emacs backup files.
 ~$
@@ -16,3 +17,6 @@
 ^#.*#$
 ^\.#
 .swp$
+
+# Devel::Cover
+^cover_db/?
index 171bb03..42e2f61 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,15 +1,15 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Excel-Template
-version:      0.17
+version:      0.19
 version_from: lib/Excel/Template.pm
 installdirs:  site
 requires:
     File::Basename:                0.01
     IO::Scalar:                    0.01
     Spreadsheet::WriteExcel:       0.42
-    Test::Simple:                  0.44
+    Test::More:                    0.01
     XML::Parser:                   0.01
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.21
index 9ab053d..225719d 100644 (file)
@@ -17,11 +17,10 @@ my $prereqs = {
 my $use_unicode = 0;
 if ($] < 5.008)
 {
-    print "Do you want Unicode support? ";
+    print "Do you want Unicode support (y/N)? ";
     my $answer = <STDIN>;
-    my $need_unicode = $answer =~ /^[Yy]/;
 
-    if ($need_unicode)
+    if ($answer =~ /^[Yy]/)
     {
             $prereqs->{'Unicode::String'} = '0.01';
             $use_unicode = 1;
@@ -29,8 +28,9 @@ if ($] < 5.008)
 }
 
 my $pm_filter = $use_unicode
-    ? q{perl -pi -e "s!UNI_YES ! !g;s!UNI_NO  !\\#!g"}
-    : q{perl -pi -e "s!UNI_NO  ! !g;s!UNI_YES !\\#!g"};
+    ? q{perl -pi.old -e "s!UNI_YES ! !g;s!UNI_NO  !\\#!g"}
+    : q{perl -pi.old -e "s!UNI_NO  ! !g;s!UNI_YES !\\#!g"}
+;
 
 WriteMakefile(
     NAME         => 'Excel::Template',
diff --git a/README b/README
index b5fedff..7b2dd94 100644 (file)
--- a/README
+++ b/README
@@ -1,11 +1,6 @@
 Excel::Template is a layout system to use the data structure from HTML::Template
-and create a Microsoft Excel file. A few caveats:
-1) All limitations stated in Spreadsheet::WriteExcel are in force, as that is
-   the module used for rendering.
-2) The output() method is not extremely well-tested.
-3) Not all the methods have been tested in all situations. I fully expect bugs
-   to come back and have to be fixed.
+and create a Microsoft Excel file.
 
-Barring all of that, and a slight lack of features, it's a good module. Enjoy!
-
-Rob
+CAVEAT: All limitations stated in Spreadsheet::WriteExcel are in force, as that
+is the module used for rendering. If the XLS file is corrupted, I would first
+make sure you aren't doing anything that it says is bad.
index 7455fb5..9c358a2 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     use Excel::Template::Base;
     use vars qw ($VERSION @ISA);
 
-    $VERSION  = '0.18';
+    $VERSION  = '0.19';
     @ISA      = qw( Excel::Template::Base );
 }
 
@@ -169,7 +169,7 @@ sub parse_xml
         close INFILE;
     }
 
-    return !!1;
+    return ~~1;
 }
 *parse = \&parse_xml;
 
@@ -187,7 +187,7 @@ sub _prepare_output
 
     $_->render($context) for @{$self->{WORKBOOKS}};
 
-    return !!1;
+    return ~~1;
 }
 
 sub register { shift; Excel::Template::Factory::register(@_) }
@@ -249,9 +249,6 @@ need to use the same datastructure as HTML::Template, but provide Excel files
 instead. The existing modules don't do the trick, as they require replication
 of logic that's already been done within HTML::Template.
 
-Currently, only a small subset of the planned features are supported. This is
-meant to be a test of the waters, to see what features people actually want.
-
 =head1 MOTIVATION
 
 I do a lot of Perl/CGI for reporting purposes. In nearly every place I've been,
@@ -265,15 +262,20 @@ into an XLS file.
 
 =head2 new()
 
-This creates a Excel::Template object. If passed a filename parameter, it will
+This creates a Excel::Template object. If passed a FILENAME parameter, it will
 parse the template in the given file. (You can also use the parse() method,
 described below.)
 
+new() accepts an optional BIG_FILE parameter. This will attempt to change the
+renderer from L<Spreadsheet::WriteExcel> to L<Spreadsheet::WriteExcel::Big>. You
+must have L<Spreadsheet::WriteExcel::Big> installed on your system.
+
+NOTE: L<Spreadsheet::WriteExcel::Big> and mod_perl clash for some reason. This
+is outside of my control.
+
 =head2 param()
 
-This method is exactly like HTML::Template's param() method. Although I will
-be adding more to this section later, please see HTML::Template's description
-for info right now.
+This method is exactly like L<HTML::Template>'s param() method.
 
 =head2 parse() / parse_xml()
 
@@ -294,31 +296,63 @@ merging of the template and the parameters occurs.)
 
 =head1 SUPPORTED NODES
 
-This is just a list of nodes. See the other classes in this distro for more
+This is a partial list of nodes. See the other classes in this distro for more
 details on specific parameters and the like.
 
 Every node can set the ROW and COL parameters. These are the actual ROW/COL
-values that the next CELL tag will write into.
+values that the next CELL-type tag will write into.
 
 =over 4
 
-=item * WORKBOOK
+=item * L<WORKBOOK|Excel::Template::Container::Workbook>
+
+This is the node representing the workbook. It is the parent for all other
+nodes.
+
+=item * L<WORKSHEET|Excel::Template::Container::Worksheet>
+
+This is the node representing a given worksheet.
+
+=item * L<IF|Excel::Template::Container::Conditional>
+
+This node represents a conditional expression. Its children may or may not be
+rendered. It behaves just like L<HTML::Template>'s TMPL_IF.
+
+=item * L<LOOP|Excel::Template::Container::Loop>
+
+This node represents a loop. It behaves just like L<HTML::Template>'s TMPL_LOOP.
+
+=item * L<ROW|Excel::Template::Container::Row>
+
+This node represents a row of data. This is the A in A1.
+
+=item * L<FORMAT|Excel::Template::Container::Format>
+
+This node varies the format for its children. All formatting options supported
+in L<Spreadsheet::WriteExcel> are supported here. There are also a number of
+formatting shortcuts, such as L<BOLD|Excel::Template::Container::Bold> and
+L<ITALIC|Excel::Template::Container::Italic>.
+
+=item * L<BACKREF|Excel::Template::Element::Backref>
+
+This refers back to a cell previously named.
 
-=item * WORKSHEET
+=item * L<CELL|Excel::Template::Element::Cell>
 
-=item * IF
+This is the actual cell in a spreadsheet.
 
-=item * LOOP
+=item * L<FORMULA|Excel::Template::Element::Formula>
 
-=item * ROW
+This is a formula in a spreadsheet.
 
-=item * CELL
+=item * L<RANGE|Excel::Template::Element::Range>
 
-=item * FORMULA
+This is a BACKREF for a number of identically-named cells.
 
-=item * BOLD
+=item * L<VAR|Excel::Template::Element::Var>
 
-=item * ITALIC
+This is a variable. It is generally used when the 'text' attribute isn't
+sufficient.
 
 =back 4
 
@@ -328,17 +362,16 @@ None, that I know of.
 
 =head1 SUPPORT
 
-This is currently beta-quality software. The featureset is extremely limited,
-but I expect to be adding on to it very soon.
+This is production quality software, used in several production web
+applications.
 
 =head1 AUTHOR
 
-    Rob Kinyon
-    rob.kinyon@gmail.com
+    Rob Kinyon (rob.kinyon@gmail.com)
 
 =head1 CONTRIBUTORS
 
-There is a mailing list at http://groups-beta.google.com/group/ExcelTemplate
+There is a mailing list at http://groups.google.com/group/ExcelTemplate
 
 Robert Graff -
 
index d622503..4c5691c 100755 (executable)
@@ -28,7 +28,7 @@ __END__
 
 =head1 NAME
 
-Excel::Template::Element::Ref
+Excel::Template::Element::Backref
 
 =head1 PURPOSE