[Bps-public-commit] rt-extension-formtools branch, master, updated. 7b5f0bea27fc0e67ef8a5ed18e213230c43b3ac0

Kevin Falcone falcone at bestpractical.com
Fri Feb 19 09:41:21 EST 2010


The branch, master has been updated
  discards  fc0ef369d38cd30b44b4962a4bccfe99151138ec (commit)
       via  7b5f0bea27fc0e67ef8a5ed18e213230c43b3ac0 (commit)
       via  a923bf35ff547abc985c21b41febd65b8e20badb (commit)
       via  6d8c6369cf6782b3250375f4685a5ca1ec893f8f (commit)
       via  1f277d7c56efef280a1f6c3e7a4fbd526515834b (commit)
       via  0adcf845ff9ca08ab7cc8f06003d9ee837ccf633 (commit)
       via  cfcc2ff5fcab61dae2d3ab38799b6c4af6401b99 (commit)
       via  9e98e8f2a419df653572e1a8a8d3aa2293b0322c (commit)
       via  c1cd0d89de078d18785a022594f0a0f811e75866 (commit)
       via  9b4b4c9da3c8e1de505f604adcb0246cc4f5fff8 (commit)
       via  f2429d89497e129ee40b0cfc47700cb2fa2a90a3 (commit)
       via  0f5b7626e41eb5a2d402ea841659b28db75073a7 (commit)
       via  b938b7fcb2a20ca1c833568095a1bea5c1eb58c5 (commit)
       via  ff152347c2fa84e8baef878d7eaeaa6d23d31ead (commit)
       via  10fa758111a70511ef878c825f344bd2c7066d1d (commit)
       via  3f8d6d6878804fa4bad8cf4b30970e8742256340 (commit)
       via  a1ed3c634c39ab1b3bbbb3191ed970d52ca97f0d (commit)
       via  32330a28426c52cf4542274ca1fdcd6298f2e2b9 (commit)
       via  57790c1688b6256af9137d030d658aacb6251616 (commit)
       via  6657b37da863eb9111eb9383e0af62a3f7611f1d (commit)
       via  efa2fcaea968d665e477b82d36a7a6212fe2fb65 (commit)
       via  1899596969ad6ff9fe3795a196620df67b8472dc (commit)
       via  a94ffe01123ba49438a51c801d20b4f1fda95402 (commit)
       via  f73321e578cedd9a031c85a57cd906c5f9469c15 (commit)
       via  b0086ca5e542d584b11c20bf618d3074dbeb2797 (commit)
       via  87c4163cb4349bf0a7b7a1e34eac603f0eb4d8e1 (commit)
       via  140a1afb3150981246030e6453c9d59333290849 (commit)
       via  5cece3371f8181833e2b2338e2a827c2d05877fd (commit)
       via  f59614b3cb9fa7608f229e4e2eb877e105371828 (commit)
       via  f0d212d9221fb55dfc82a70bf24aeff53f2e5d97 (commit)
       via  ba38ec132044910317b365504418ba9066b1f599 (commit)
       via  2f301d65fbe70cfa9fbf1ab480c7770f5160b298 (commit)
       via  5433e25ff11488c2d2ac8614318c7321704a3ace (commit)
       via  08d4f36b33087020e35f17bcd450ba16567c3c01 (commit)
       via  b19083ad86e4c78c32dfb6475923e3abbabff44c (commit)
       via  d3ee60a5fe93cef2c61c63dc3b821c425ed5cdbb (commit)
       via  5430bf178fb02fb8627c9c74ffd1b81126c67558 (commit)
       via  1adb47c58b50aabe414a5859cbd1f7535e941197 (commit)
       via  f2d8153b1c62c675e822bd1a395ea445f2598981 (commit)
       via  17afcc0772326e6365875a51f523b6411a0ad397 (commit)
       via  f78f4141be1daebce8b69ff85f8f9b4e0a60e928 (commit)
       via  2b1a3c3ef015797d382c97afc1f814a714fb05b0 (commit)
       via  127722a9596143947ff429085cc43057c3395613 (commit)
       via  b05a3bf086219e43243f422a2ad1997c242ccb1b (commit)
       via  f9cf8a5feb77f3a5a38d6482d1084c052403c173 (commit)
       via  ee204e51fec25f177fa2569577c447b5a5d70595 (commit)
       via  79302ae3b8843d8c6d5a41d34233e8c3d5156b4b (commit)
       via  cc8ac9c09905c8ade87d1f7498348107122a9d91 (commit)
       via  fc6b7114a3d4899069d185c0d0d1a3b6962b97cc (commit)
       via  bb643b638a581157684f5fd38fc0ff93297f9d42 (commit)
       via  855e18f4a729c6c7de8538e8ee580cf9879e7d4f (commit)
       via  034366ae132b1236fc10545f85d95e41cc6af3f5 (commit)
       via  dcf556bcbfd98ac003124ead6b87d584a116136c (commit)
       via  a23920253596de4e572b4f40f4a5d085f9234ea5 (commit)
       via  0c8545e4dffa61a2473ff85cbd53c05279533461 (commit)
       via  463290aef6b6d3ca03fc35db35cebb683158b2ac (commit)
       via  4b7727c0be8b1054703a6b193ca975dd6e39f940 (commit)
       via  0c1216580cb8b255f4fc48179316aaa04a876891 (commit)
       via  75fbdabc5555d34ba08534dd487477e02573a23c (commit)
       via  2fce5647a76b26d7aaa58ee05d45b3cb249497a3 (commit)
       via  a6aaca060d840b4b2b99c157598d1ce01774e19a (commit)
       via  39359807e42c15ab6101471b660158e51db1f548 (commit)
       via  813ab059d0ae1d4117089da0ccb3d81d456427ff (commit)
       via  88a23041a865546a02c605ad9a9a3a31ec03c984 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (fc0ef369d38cd30b44b4962a4bccfe99151138ec)
            \
             N -- N -- N (7b5f0bea27fc0e67ef8a5ed18e213230c43b3ac0)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Summary of changes:
 MANIFEST                       |   17 ++
 Makefile.PL                    |    7 +
 html/FormTools/Field           |  198 ++++++++++++++++
 html/FormTools/Form            |  104 +++++++++
 html/FormTools/Next            |    1 +
 html/FormTools/ShowChoices     |   20 ++
 inc/Module/Install.pm          |  369 ++++++++++++++++++++++++++++++
 inc/Module/Install/Base.pm     |   72 ++++++
 inc/Module/Install/Can.pm      |   83 +++++++
 inc/Module/Install/Fetch.pm    |   93 ++++++++
 inc/Module/Install/Makefile.pm |  253 +++++++++++++++++++++
 inc/Module/Install/Metadata.pm |  483 ++++++++++++++++++++++++++++++++++++++++
 inc/Module/Install/RTx.pm      |  191 ++++++++++++++++
 inc/Module/Install/Win32.pm    |   64 ++++++
 inc/Module/Install/WriteAll.pm |   40 ++++
 lib/RT/Extension/FormTools.pm  |   91 ++++++++
 16 files changed, 2086 insertions(+), 0 deletions(-)
 delete mode 100644 .gitignore
 create mode 100644 MANIFEST
 create mode 100644 Makefile.PL
 create mode 100644 html/FormTools/Field
 create mode 100644 html/FormTools/Form
 create mode 100644 html/FormTools/Next
 create mode 100644 html/FormTools/ShowChoices
 create mode 100644 inc/Module/Install.pm
 create mode 100644 inc/Module/Install/Base.pm
 create mode 100644 inc/Module/Install/Can.pm
 create mode 100644 inc/Module/Install/Fetch.pm
 create mode 100644 inc/Module/Install/Makefile.pm
 create mode 100644 inc/Module/Install/Metadata.pm
 create mode 100644 inc/Module/Install/RTx.pm
 create mode 100644 inc/Module/Install/Win32.pm
 create mode 100644 inc/Module/Install/WriteAll.pm
 create mode 100644 lib/RT/Extension/FormTools.pm

- Log -----------------------------------------------------------------
commit 88a23041a865546a02c605ad9a9a3a31ec03c984
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Aug 15 16:58:47 2007 +0000

commit 813ab059d0ae1d4117089da0ccb3d81d456427ff
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Fri Aug 17 00:08:45 2007 +0000

    r65972 at h4605972a:  jesse | 2007-08-15 17:18:11 -0700
    checkpoint
    r65973 at h4605972a:  jesse | 2007-08-16 15:34:36 -0700
     * checkpoint
    r65984 at h4605972a:  jesse | 2007-08-16 17:06:38 -0700
     * checkpoint
    r65985 at h4605972a:  jesse | 2007-08-16 17:07:41 -0700
    checkpoint
    r65986 at h4605972a:  jesse | 2007-08-16 17:08:27 -0700
    checkpoint

diff --git a/META.yml b/META.yml
new file mode 100644
index 0000000..d2ea796
--- /dev/null
+++ b/META.yml
@@ -0,0 +1,16 @@
+--- 
+abstract: RT Extension-FormTools Extension
+distribution_type: module
+generated_by: Module::Install version 0.67
+license: unknown
+meta-spec: 
+  url: http://module-build.sourceforge.net/META-spec-v1.3.html
+  version: 1.3
+name: RT-Extension-FormTools
+no_index: 
+  directory: 
+    - etc
+    - html
+    - inc
+    - t
+version: undef
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..70a3278
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,793 @@
+# This Makefile is for the RT::Extension::FormTools extension to perl.
+#
+# It was generated automatically by MakeMaker version
+# 6.31 (Revision: 19606) from the contents of
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
+#
+#       ANY CHANGES MADE HERE WILL BE LOST!
+#
+#   MakeMaker ARGV: ()
+#
+#   MakeMaker Parameters:
+
+#     ABSTRACT => q[RT Extension-FormTools Extension]
+#     DIR => []
+#     DISTNAME => q[RT-Extension-FormTools]
+#     INSTALLSITELIB => q[/opt/rt3/local/lib]
+#     NAME => q[RT::Extension::FormTools]
+#     NO_META => q[1]
+#     PL_FILES => {  }
+#     PREREQ_PM => {  }
+#     VERSION => q[undef]
+#     dist => {  }
+
+# --- MakeMaker post_initialize section:
+
+
+# --- MakeMaker const_config section:
+
+# These definitions are from config.sh (via /opt/local/lib/perl5/5.8.8/darwin-2level/Config.pm)
+
+# They may have been overridden via Makefile.PL or on the command line
+AR = ar
+CC = /usr/bin/gcc-4.0
+CCCDLFLAGS =  
+CCDLFLAGS =  
+DLEXT = bundle
+DLSRC = dl_dlopen.xs
+EXE_EXT = 
+FULL_AR = /usr/bin/ar
+LD = env MACOSX_DEPLOYMENT_TARGET=10.3 cc
+LDDLFLAGS = -L/opt/local/lib -bundle -undefined dynamic_lookup
+LDFLAGS = -L/opt/local/lib
+LIBC = /usr/lib/libc.dylib
+LIB_EXT = .a
+OBJ_EXT = .o
+OSNAME = darwin
+OSVERS = 8.6.2
+RANLIB = ranlib
+SITELIBEXP = /opt/local/lib/perl5/site_perl/5.8.8
+SITEARCHEXP = /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
+SO = dylib
+VENDORARCHEXP = /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
+VENDORLIBEXP = /opt/local/lib/perl5/vendor_perl/5.8.8
+
+
+# --- MakeMaker constants section:
+AR_STATIC_ARGS = cr
+DIRFILESEP = /
+DFSEP = $(DIRFILESEP)
+NAME = RT::Extension::FormTools
+NAME_SYM = RT_Extension_FormTools
+VERSION = undef
+VERSION_MACRO = VERSION
+VERSION_SYM = undef
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
+XS_VERSION = undef
+XS_VERSION_MACRO = XS_VERSION
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
+INST_ARCHLIB = blib/arch
+INST_SCRIPT = blib/script
+INST_BIN = blib/bin
+INST_LIB = blib/lib
+INST_MAN1DIR = blib/man1
+INST_MAN3DIR = blib/man3
+MAN1EXT = 1
+MAN3EXT = 3
+INSTALLDIRS = site
+DESTDIR = 
+PREFIX = $(SITEPREFIX)
+PERLPREFIX = /opt/local
+SITEPREFIX = /opt/local
+VENDORPREFIX = /opt/local
+INSTALLPRIVLIB = /opt/local/lib/perl5/5.8.8
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
+INSTALLSITELIB = /opt/rt3/local/lib
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
+INSTALLVENDORLIB = /opt/local/lib/perl5/vendor_perl/5.8.8
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
+INSTALLARCHLIB = /opt/local/lib/perl5/5.8.8/darwin-2level
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
+INSTALLSITEARCH = /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
+INSTALLVENDORARCH = /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
+INSTALLBIN = /opt/local/bin
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
+INSTALLSITEBIN = /opt/local/bin
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
+INSTALLVENDORBIN = /opt/local/bin
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
+INSTALLSCRIPT = /opt/local/bin
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
+INSTALLSITESCRIPT = /opt/local/bin
+DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
+INSTALLVENDORSCRIPT = /opt/local/bin
+DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
+INSTALLMAN1DIR = /opt/local/share/man/man1
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
+INSTALLSITEMAN1DIR = /opt/local/share/man/man1
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
+INSTALLVENDORMAN1DIR = /opt/local/share/man/man1
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
+INSTALLMAN3DIR = /opt/local/share/man/man3
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
+INSTALLSITEMAN3DIR = /opt/local/share/man/man3
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
+INSTALLVENDORMAN3DIR = /opt/local/share/man/man3
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
+PERL_LIB =
+PERL_ARCHLIB = /opt/local/lib/perl5/5.8.8/darwin-2level
+LIBPERL_A = libperl.a
+FIRST_MAKEFILE = Makefile
+MAKEFILE_OLD = Makefile.old
+MAKE_APERL_FILE = Makefile.aperl
+PERLMAINCC = $(CC)
+PERL_INC = /opt/local/lib/perl5/5.8.8/darwin-2level/CORE
+PERL = /opt/local/bin/perl "-Iinc"
+FULLPERL = /opt/local/bin/perl "-Iinc"
+ABSPERL = $(PERL)
+PERLRUN = $(PERL)
+FULLPERLRUN = $(FULLPERL)
+ABSPERLRUN = $(ABSPERL)
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)"
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)"
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)"
+PERL_CORE = 0
+PERM_RW = 644
+PERM_RWX = 755
+
+MAKEMAKER   = /opt/local/lib/perl5/5.8.8/ExtUtils/MakeMaker.pm
+MM_VERSION  = 6.31
+MM_REVISION = 19606
+
+# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
+# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
+# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
+# DLBASE  = Basename part of dynamic library. May be just equal BASEEXT.
+MAKE = make
+FULLEXT = RT/Extension/FormTools
+BASEEXT = FormTools
+PARENT_NAME = RT::Extension
+DLBASE = $(BASEEXT)
+VERSION_FROM = 
+OBJECT = 
+LDFROM = $(OBJECT)
+LINKTYPE = dynamic
+BOOTDEP = 
+
+# Handy lists of source code files:
+XS_FILES = 
+C_FILES  = 
+O_FILES  = 
+H_FILES  = 
+MAN1PODS = 
+MAN3PODS = 
+
+# Where is the Config information that we are using/depend on
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
+
+# Where to build things
+INST_LIBDIR      = $(INST_LIB)/RT/Extension
+INST_ARCHLIBDIR  = $(INST_ARCHLIB)/RT/Extension
+
+INST_AUTODIR     = $(INST_LIB)/auto/$(FULLEXT)
+INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
+
+INST_STATIC      = 
+INST_DYNAMIC     = 
+INST_BOOT        = 
+
+# Extra linker info
+EXPORT_LIST        = 
+PERL_ARCHIVE       = 
+PERL_ARCHIVE_AFTER = 
+
+
+TO_INST_PM = lib/RT/Extension/FormTools.pm \
+	lib/RT/FormTools/Flow.pm
+
+PM_TO_BLIB = lib/RT/FormTools/Flow.pm \
+	blib/lib/RT/FormTools/Flow.pm \
+	lib/RT/Extension/FormTools.pm \
+	blib/lib/RT/Extension/FormTools.pm
+
+
+# --- MakeMaker platform_constants section:
+MM_Unix_VERSION = 1.51
+PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
+
+
+# --- MakeMaker tool_autosplit section:
+# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
+AUTOSPLITFILE = $(ABSPERLRUN)  -e 'use AutoSplit;  autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
+
+
+
+# --- MakeMaker tool_xsubpp section:
+
+
+# --- MakeMaker tools_other section:
+SHELL = /bin/sh
+CHMOD = chmod
+CP = cp
+MV = mv
+NOOP = $(SHELL) -c true
+NOECHO = @
+RM_F = rm -f
+RM_RF = rm -rf
+TEST_F = test -f
+TOUCH = touch
+UMASK_NULL = umask 0
+DEV_NULL = > /dev/null 2>&1
+MKPATH = $(ABSPERLRUN) "-MExtUtils::Command" -e mkpath
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) "-MExtUtils::Command" -e eqtime
+ECHO = echo
+ECHO_N = echo -n
+UNINST = 0
+VERBINST = 0
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install({@ARGV}, '\''$(VERBINST)'\'', 0, '\''$(UNINST)'\'');' --
+DOC_INSTALL = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e perllocal_install
+UNINSTALL = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e uninstall
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist
+MACROSTART = 
+MACROEND = 
+USEMAKEFILE = -f
+FIXIN = $(PERLRUN) "-MExtUtils::MY" -e "MY->fixin(shift)"
+
+
+# --- MakeMaker makemakerdflt section:
+makemakerdflt: all
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dist section:
+TAR = tar
+TARFLAGS = cvf
+ZIP = zip
+ZIPFLAGS = -r
+COMPRESS = gzip --best
+SUFFIX = .gz
+SHAR = shar
+PREOP = $(NOECHO) $(NOOP)
+POSTOP = $(NOECHO) $(NOOP)
+TO_UNIX = $(NOECHO) $(NOOP)
+CI = ci -u
+RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
+DIST_CP = best
+DIST_DEFAULT = tardist
+DISTNAME = RT-Extension-FormTools
+DISTVNAME = RT-Extension-FormTools-undef
+
+
+# --- MakeMaker macro section:
+
+
+# --- MakeMaker depend section:
+
+
+# --- MakeMaker cflags section:
+
+
+# --- MakeMaker const_loadlibs section:
+
+
+# --- MakeMaker const_cccmd section:
+
+
+# --- MakeMaker post_constants section:
+
+
+# --- MakeMaker pasthru section:
+
+PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
+	LINKTYPE="$(LINKTYPE)"\
+	PREFIX="$(PREFIX)"
+
+
+# --- MakeMaker special_targets section:
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
+
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
+
+
+
+# --- MakeMaker c_o section:
+
+
+# --- MakeMaker xs_c section:
+
+
+# --- MakeMaker xs_o section:
+
+
+# --- MakeMaker top_targets section:
+all :: pure_all manifypods
+	$(NOECHO) $(NOOP)
+
+
+pure_all :: config pm_to_blib subdirs linkext
+	$(NOECHO) $(NOOP)
+
+subdirs :: $(MYEXTLIB)
+	$(NOECHO) $(NOOP)
+
+config :: $(FIRST_MAKEFILE) blibdirs
+	$(NOECHO) $(NOOP)
+
+help :
+	perldoc ExtUtils::MakeMaker
+
+
+# --- MakeMaker blibdirs section:
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
+	$(NOECHO) $(NOOP)
+
+# Backwards compat with 6.18 through 6.25
+blibdirs.ts : blibdirs
+	$(NOECHO) $(NOOP)
+
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_LIBDIR)
+	$(NOECHO) $(CHMOD) 755 $(INST_LIBDIR)
+	$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
+
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
+	$(NOECHO) $(CHMOD) 755 $(INST_ARCHLIB)
+	$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
+
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_AUTODIR)
+	$(NOECHO) $(CHMOD) 755 $(INST_AUTODIR)
+	$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
+
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+	$(NOECHO) $(CHMOD) 755 $(INST_ARCHAUTODIR)
+	$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
+
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_BIN)
+	$(NOECHO) $(CHMOD) 755 $(INST_BIN)
+	$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
+
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_SCRIPT)
+	$(NOECHO) $(CHMOD) 755 $(INST_SCRIPT)
+	$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
+
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
+	$(NOECHO) $(CHMOD) 755 $(INST_MAN1DIR)
+	$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
+
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
+	$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
+	$(NOECHO) $(CHMOD) 755 $(INST_MAN3DIR)
+	$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
+
+
+
+# --- MakeMaker linkext section:
+
+linkext :: $(LINKTYPE)
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dlsyms section:
+
+
+# --- MakeMaker dynamic section:
+
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dynamic_bs section:
+
+BOOTSTRAP =
+
+
+# --- MakeMaker dynamic_lib section:
+
+
+# --- MakeMaker static section:
+
+## $(INST_PM) has been moved to the all: target.
+## It remains here for awhile to allow for old usage: "make static"
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker static_lib section:
+
+
+# --- MakeMaker manifypods section:
+
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
+POD2MAN = $(POD2MAN_EXE)
+
+
+manifypods : pure_all 
+	$(NOECHO) $(NOOP)
+
+
+
+
+# --- MakeMaker processPL section:
+
+
+# --- MakeMaker installbin section:
+
+
+# --- MakeMaker subdirs section:
+
+# none
+
+# --- MakeMaker clean_subdirs section:
+clean_subdirs :
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker clean section:
+
+# Delete temporary files but do not touch installed files. We don't delete
+# the Makefile here so a later make realclean still has a makefile to use.
+
+clean :: clean_subdirs
+	- $(RM_F) \
+	  *$(LIB_EXT) core \
+	  core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
+	  core.[0-9][0-9] $(BASEEXT).bso \
+	  pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
+	  $(BASEEXT).x $(BOOTSTRAP) \
+	  perl$(EXE_EXT) tmon.out \
+	  *$(OBJ_EXT) pm_to_blib \
+	  $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
+	  core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
+	  core.*perl.*.? $(MAKE_APERL_FILE) \
+	  perl $(BASEEXT).def \
+	  core.[0-9][0-9][0-9] mon.out \
+	  lib$(BASEEXT).def perlmain.c \
+	  perl.exe so_locations \
+	  $(BASEEXT).exp 
+	- $(RM_RF) \
+	  blib 
+	- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
+
+
+# --- MakeMaker realclean_subdirs section:
+realclean_subdirs :
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker realclean section:
+# Delete temporary files (via clean) and also delete dist files
+realclean purge ::  clean realclean_subdirs
+	- $(RM_F) \
+	  $(MAKEFILE_OLD) $(FIRST_MAKEFILE) 
+	- $(RM_RF) \
+	  $(DISTVNAME) 
+
+
+# --- MakeMaker metafile section:
+metafile:
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker signature section:
+signature :
+	cpansign -s
+
+
+# --- MakeMaker dist_basics section:
+distclean :: realclean distcheck
+	$(NOECHO) $(NOOP)
+
+distcheck :
+	$(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
+
+skipcheck :
+	$(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
+
+manifest :
+	$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
+
+veryclean : realclean
+	$(RM_F) *~ *.orig */*~ */*.orig
+
+
+
+# --- MakeMaker dist_core section:
+
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
+	$(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
+	  -e '    if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
+
+tardist : $(DISTVNAME).tar$(SUFFIX)
+	$(NOECHO) $(NOOP)
+
+uutardist : $(DISTVNAME).tar$(SUFFIX)
+	uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
+
+$(DISTVNAME).tar$(SUFFIX) : distdir
+	$(PREOP)
+	$(TO_UNIX)
+	$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
+	$(RM_RF) $(DISTVNAME)
+	$(COMPRESS) $(DISTVNAME).tar
+	$(POSTOP)
+
+zipdist : $(DISTVNAME).zip
+	$(NOECHO) $(NOOP)
+
+$(DISTVNAME).zip : distdir
+	$(PREOP)
+	$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
+	$(RM_RF) $(DISTVNAME)
+	$(POSTOP)
+
+shdist : distdir
+	$(PREOP)
+	$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
+	$(RM_RF) $(DISTVNAME)
+	$(POSTOP)
+
+
+# --- MakeMaker distdir section:
+create_distdir :
+	$(RM_RF) $(DISTVNAME)
+	$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
+		-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
+
+distdir : create_distdir  
+	$(NOECHO) $(NOOP)
+
+
+
+# --- MakeMaker dist_test section:
+disttest : distdir
+	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL 
+	cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
+	cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
+
+
+
+# --- MakeMaker dist_ci section:
+
+ci :
+	$(PERLRUN) "-MExtUtils::Manifest=maniread" \
+	  -e "@all = keys %{ maniread() };" \
+	  -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
+	  -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
+
+
+# --- MakeMaker distmeta section:
+distmeta : create_distdir metafile
+	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
+	  -e '    or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
+
+
+
+# --- MakeMaker distsignature section:
+distsignature : create_distdir
+	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
+	  -e '    or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
+	$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
+	cd $(DISTVNAME) && cpansign -s
+
+
+
+# --- MakeMaker install section:
+
+install :: all pure_install doc_install
+	$(NOECHO) $(NOOP)
+
+install_perl :: all pure_perl_install doc_perl_install
+	$(NOECHO) $(NOOP)
+
+install_site :: all pure_site_install doc_site_install
+	$(NOECHO) $(NOOP)
+
+install_vendor :: all pure_vendor_install doc_vendor_install
+	$(NOECHO) $(NOOP)
+
+pure_install :: pure_$(INSTALLDIRS)_install
+	$(NOECHO) $(NOOP)
+
+doc_install :: doc_$(INSTALLDIRS)_install
+	$(NOECHO) $(NOOP)
+
+pure__install : pure_site_install
+	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+doc__install : doc_site_install
+	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+pure_perl_install ::
+	$(NOECHO) $(MOD_INSTALL) \
+		read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
+		write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
+		$(INST_LIB) $(DESTINSTALLPRIVLIB) \
+		$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+		$(INST_BIN) $(DESTINSTALLBIN) \
+		$(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
+		$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
+		$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
+	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+		$(SITEARCHEXP)/auto/$(FULLEXT)
+
+
+pure_site_install ::
+	$(NOECHO) $(MOD_INSTALL) \
+		read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
+		write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
+		$(INST_LIB) $(DESTINSTALLSITELIB) \
+		$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
+		$(INST_BIN) $(DESTINSTALLSITEBIN) \
+		$(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
+		$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
+		$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
+	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+		$(PERL_ARCHLIB)/auto/$(FULLEXT)
+
+pure_vendor_install ::
+	$(NOECHO) $(MOD_INSTALL) \
+		read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \
+		write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \
+		$(INST_LIB) $(DESTINSTALLVENDORLIB) \
+		$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+		$(INST_BIN) $(DESTINSTALLVENDORBIN) \
+		$(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
+		$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
+		$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+doc_perl_install ::
+	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+	-$(NOECHO) $(DOC_INSTALL) \
+		"Module" "$(NAME)" \
+		"installed into" "$(INSTALLPRIVLIB)" \
+		LINKTYPE "$(LINKTYPE)" \
+		VERSION "$(VERSION)" \
+		EXE_FILES "$(EXE_FILES)" \
+		>> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+doc_site_install ::
+	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+	-$(NOECHO) $(DOC_INSTALL) \
+		"Module" "$(NAME)" \
+		"installed into" "$(INSTALLSITELIB)" \
+		LINKTYPE "$(LINKTYPE)" \
+		VERSION "$(VERSION)" \
+		EXE_FILES "$(EXE_FILES)" \
+		>> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+doc_vendor_install ::
+	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+	-$(NOECHO) $(DOC_INSTALL) \
+		"Module" "$(NAME)" \
+		"installed into" "$(INSTALLVENDORLIB)" \
+		LINKTYPE "$(LINKTYPE)" \
+		VERSION "$(VERSION)" \
+		EXE_FILES "$(EXE_FILES)" \
+		>> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+
+uninstall :: uninstall_from_$(INSTALLDIRS)dirs
+	$(NOECHO) $(NOOP)
+
+uninstall_from_perldirs ::
+	$(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_sitedirs ::
+	$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_vendordirs ::
+	$(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist
+
+
+# --- MakeMaker force section:
+# Phony target to force checking subdirectories.
+FORCE:
+	$(NOECHO) $(NOOP)
+
+
+# --- MakeMaker perldepend section:
+
+
+# --- MakeMaker makefile section:
+# We take a very conservative approach here, but it's worth it.
+# We move Makefile to Makefile.old here to avoid gnu make looping.
+$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
+	$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
+	$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
+	-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+	-$(NOECHO) $(MV)   $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
+	- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
+	$(PERLRUN) Makefile.PL 
+	$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
+	$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command.  <=="
+	false
+
+
+
+# --- MakeMaker staticmake section:
+
+# --- MakeMaker makeaperl section ---
+MAP_TARGET    = perl
+FULLPERL      = /opt/local/bin/perl
+
+$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
+	$(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
+
+$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
+	$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
+	$(NOECHO) $(PERLRUNINST) \
+		Makefile.PL DIR= \
+		MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
+		MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
+
+
+# --- MakeMaker test section:
+
+TEST_VERBOSE=0
+TEST_TYPE=test_$(LINKTYPE)
+TEST_FILE = test.pl
+TEST_FILES = 
+TESTDB_SW = -d
+
+testdb :: testdb_$(LINKTYPE)
+
+test :: $(TEST_TYPE)
+	$(NOECHO) $(ECHO) 'No tests defined for $(NAME) extension.'
+
+test_dynamic :: pure_all
+
+testdb_dynamic :: pure_all
+	PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-Iinc" "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
+
+test_ : test_dynamic
+
+test_static :: test_dynamic
+testdb_static :: testdb_dynamic
+
+
+# --- MakeMaker ppd section:
+# Creates a PPD (Perl Package Description) for a binary distribution.
+ppd:
+	$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="undef,0,0,0">' > $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '    <TITLE>$(DISTNAME)</TITLE>' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '    <ABSTRACT>RT Extension-FormTools Extension</ABSTRACT>' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '    <AUTHOR></AUTHOR>' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '    <IMPLEMENTATION>' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '        <OS NAME="$(OSNAME)" />' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '        <ARCHITECTURE NAME="darwin-2level-5.8" />' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '        <CODEBASE HREF="" />' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '    </IMPLEMENTATION>' >> $(DISTNAME).ppd
+	$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
+
+
+# --- MakeMaker pm_to_blib section:
+
+pm_to_blib : $(TO_INST_PM)
+	$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')' -- \
+	  lib/RT/FormTools/Flow.pm blib/lib/RT/FormTools/Flow.pm \
+	  lib/RT/Extension/FormTools.pm blib/lib/RT/Extension/FormTools.pm 
+	$(NOECHO) $(TOUCH) pm_to_blib
+
+
+# --- MakeMaker selfdocument section:
+
+
+# --- MakeMaker postamble section:
+
+
+# End.
+# Postamble by Module::Install 0.67
+install ::
+	$(NOECHO) $(PERL) -MExtUtils::Install -e "install({q(html), q(/opt/rt3/share/html), q(etc), q(/opt/rt3/local/etc/Extension-FormTools)})"
+
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..aecb5a8
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,5 @@
+use inc::Module::Install;
+RTx('RT-Extension-FormTools');
+
+WriteAll();
+
diff --git a/html/FormTools/Field b/html/FormTools/Field
new file mode 100644
index 0000000..d533aed
--- /dev/null
+++ b/html/FormTools/Field
@@ -0,0 +1,85 @@
+<%args>
+$name
+$label => undef
+$render_as => 'normal'
+$default => undef
+$cols => undef
+$empty_allowed => 1
+</%args>
+<%init>
+my $NamePrefix = "Object-RT::Ticket--CustomField-";
+my $queue      = $m->notes('queue');
+my $field_type = 'custom';
+my $field_label ||= $label;
+my $cf;
+if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
+    $field_type = 'core';
+    $m->notes(
+        core_fields_on_page => ( $m->notes('core_fields_on_page'), $name ) );
+    $field_label ||= $name;
+} else {
+
+    $cf = RT::CustomField->new( $session{'CurrentUser'} );
+    $cf->LoadByName( Name => $name, Queue => $queue->id );
+    unless ( $cf->id ) {
+        die "Could not find a custom field called $name for the queue "
+            . $queue->Name;
+    }
+
+    $m->notes( cfs_on_page => ( $m->notes('cfs_on_page'), $cf->id ) );
+    $field_label ||= $cf->Name;
+}
+
+</%init>
+<table style="display: inline; "><tr><th valign="top"><label><%$field_label%></label></th><td style="display:block;">
+% if ($field_type eq 'core') {
+<input type="text" name=<%$name%> size="20" value="<%$default%>">
+% } else {
+
+
+% if ($render_as eq 'normal') {
+    <& /Elements/EditCustomField, Object => $queue, CustomField => $cf, NamePrefix => $NamePrefix, 
+            ($cf->Type =~ /text/i) ? (Rows => 6, Cols => $cols ||60) : (),
+            ($cf->Type =~ /freeform/i) ? (Rows => 6, Cols => $cols ||30) : (),
+            
+            
+            &>
+% } elsif ($render_as =~ /^radio/)  {
+%       my $selected = 0;
+%       my $id = $NamePrefix . $cf->Id;
+% if ($empty_allowed) {
+        <input type="radio" name="<%$id%>-Values" value="" <% !$default ?  'CHECKED' : '' %>><&|/l&>(no value)</&>
+%        if ($render_as =~ /vertical/) { 
+            <br/>
+%        }
+
+% }
+% my $CFVs = $cf->Values;
+% while ($CFVs and my $value = $CFVs->Next ) {
+        <input type="radio" name="<%$id%>-Values"  value="<%$value->Name%>" 
+%  if ($default) {
+            <% ($default eq $value->Name) ? 'CHECKED' : '' %>
+% }
+            ><% $value->Name%> 
+
+%        if ($render_as =~ /vertical/) { 
+            <br/>
+%        }
+
+% }
+% } elsif ($render_as =~  /^check/i)  {
+%       my $id = $NamePrefix . $cf->Id;
+% my $CFVs = $cf->Values;
+% while ($CFVs and my $value = $CFVs->Next ) {
+        <input type="checkbox" name="<%$id%>-Values"  value="<%$value->Name%>" 
+%  if ($default) {
+            <% ($default eq $value->Name) ? 'CHECKED' : '' %>
+% }
+            ><% $value->Name%><br/>
+% }
+% } else {
+% die "'$render_as' isn't a valid rendering option for field '$name'";
+%}
+
+% }
+</td></tr></table>
diff --git a/html/FormTools/Form b/html/FormTools/Form
new file mode 100644
index 0000000..5cffb4b
--- /dev/null
+++ b/html/FormTools/Form
@@ -0,0 +1,39 @@
+<%args>
+$next
+</%args>
+<%init>
+my $content = $m->content;
+
+my %cfs = map { $_ => 1} $m->notes('cfs_on_page') || ();
+my %core_fields = map { $_ => 1} $m->notes('core_fields_on_page') || ();
+
+my %request_args = $m->request_args;
+
+foreach my $key (keys %request_args) {
+   next unless ($key =~ /CustomField-(\d+)/ );
+   my $cf = $1;
+   delete $request_args{$key} if ($cfs{$cf});
+}
+
+foreach my $key (keys %request_args) {
+   next unless ($key =~ /CoreField-(\d+)/ );
+   my $field = $1;
+   delete $request_args{$key} if ($core_fields{$field});
+}
+
+</%init>
+<& /Elements/Header, Title => $m->notes('page_title') &>
+
+<& /Elements/PageLayout, title => $m->notes('page_title') &>
+
+<form method="POST" action="<%$next%>">
+<%$content|n%>
+
+% foreach my $key (keys %request_args) {
+% foreach my $val ( ref ($request_args{$key}) ? @{$request_args{$key}} : ($request_args{$key})) {
+
+<input type="hidden" name="<%$key%>" value="<%$val%>" />
+% }
+% }
+
+</form>
diff --git a/html/FormTools/Next b/html/FormTools/Next
new file mode 100644
index 0000000..6cf7b01
--- /dev/null
+++ b/html/FormTools/Next
@@ -0,0 +1 @@
+<& /Elements/Submit &>
diff --git a/html/FormTools/ShowChoices b/html/FormTools/ShowChoices
new file mode 100644
index 0000000..3111632
--- /dev/null
+++ b/html/FormTools/ShowChoices
@@ -0,0 +1,20 @@
+<%init>
+my $queue = $m->notes('queue');
+
+my %all_fields = $m->request_args;
+</%init>
+<table>
+% foreach my $field (keys %all_fields) {
+% next if $field =~ /-Magic/;
+% my $cf = RT::CustomField->new($session{'CurrentUser'});
+% if ($field =~ /CustomField-(\d+)/) {
+% my $id = $1;
+%$cf->Load($id);
+<tr><td><b><%$cf->Name%></b></td><td><% ref ($all_fields{$field}) ? join(', ',@{$all_fields{$field}}) : $all_fields{$field}%></td></tr>
+% } else {
+
+<tr><td><b><%$field%></b></td><td><% $all_fields{$field} %></td></tr>
+%}
+
+% }
+</table>
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
new file mode 100644
index 0000000..9d13686
--- /dev/null
+++ b/inc/Module/Install.pm
@@ -0,0 +1,281 @@
+#line 1
+package Module::Install;
+
+# For any maintainers:
+# The load order for Module::Install is a bit magic.
+# It goes something like this...
+#
+# IF ( host has Module::Install installed, creating author mode ) {
+#     1. Makefile.PL calls "use inc::Module::Install"
+#     2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
+#     3. The installed version of inc::Module::Install loads
+#     4. inc::Module::Install calls "require Module::Install"
+#     5. The ./inc/ version of Module::Install loads
+# } ELSE {
+#     1. Makefile.PL calls "use inc::Module::Install"
+#     2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
+#     3. The ./inc/ version of Module::Install loads
+# }
+
+use 5.004;
+use strict 'vars';
+
+use vars qw{$VERSION};
+BEGIN {
+    # All Module::Install core packages now require synchronised versions.
+    # This will be used to ensure we don't accidentally load old or
+    # different versions of modules.
+    # This is not enforced yet, but will be some time in the next few
+    # releases once we can make sure it won't clash with custom
+    # Module::Install extensions.
+    $VERSION = '0.67';
+}
+
+# Whether or not inc::Module::Install is actually loaded, the
+# $INC{inc/Module/Install.pm} is what will still get set as long as
+# the caller loaded module this in the documented manner.
+# If not set, the caller may NOT have loaded the bundled version, and thus
+# they may not have a MI version that works with the Makefile.PL. This would
+# result in false errors or unexpected behaviour. And we don't want that.
+my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
+unless ( $INC{$file} ) {
+    die <<"END_DIE";
+Please invoke ${\__PACKAGE__} with:
+
+    use inc::${\__PACKAGE__};
+
+not:
+
+    use ${\__PACKAGE__};
+
+END_DIE
+}
+
+# If the script that is loading Module::Install is from the future,
+# then make will detect this and cause it to re-run over and over
+# again. This is bad. Rather than taking action to touch it (which
+# is unreliable on some platforms and requires write permissions)
+# for now we should catch this and refuse to run.
+if ( -f $0 and (stat($0))[9] > time ) {
+	die << "END_DIE";
+Your installer $0 has a modification time in the future.
+
+This is known to create infinite loops in make.
+
+Please correct this, then run $0 again.
+
+END_DIE
+}
+
+use Cwd        ();
+use File::Find ();
+use File::Path ();
+use FindBin;
+
+*inc::Module::Install::VERSION = *VERSION;
+ at inc::Module::Install::ISA     = __PACKAGE__;
+
+sub autoload {
+    my $self = shift;
+    my $who  = $self->_caller;
+    my $cwd  = Cwd::cwd();
+    my $sym  = "${who}::AUTOLOAD";
+    $sym->{$cwd} = sub {
+        my $pwd = Cwd::cwd();
+        if ( my $code = $sym->{$pwd} ) {
+            # delegate back to parent dirs
+            goto &$code unless $cwd eq $pwd;
+        }
+        $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
+        unshift @_, ($self, $1);
+        goto &{$self->can('call')} unless uc($1) eq $1;
+    };
+}
+
+sub import {
+    my $class = shift;
+    my $self  = $class->new(@_);
+    my $who   = $self->_caller;
+
+    unless ( -f $self->{file} ) {
+        require "$self->{path}/$self->{dispatch}.pm";
+        File::Path::mkpath("$self->{prefix}/$self->{author}");
+        $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
+        $self->{admin}->init;
+        @_ = ($class, _self => $self);
+        goto &{"$self->{name}::import"};
+    }
+
+    *{"${who}::AUTOLOAD"} = $self->autoload;
+    $self->preload;
+
+    # Unregister loader and worker packages so subdirs can use them again
+    delete $INC{"$self->{file}"};
+    delete $INC{"$self->{path}.pm"};
+}
+
+sub preload {
+    my ($self) = @_;
+
+    unless ( $self->{extensions} ) {
+        $self->load_extensions(
+            "$self->{prefix}/$self->{path}", $self
+        );
+    }
+
+    my @exts = @{$self->{extensions}};
+    unless ( @exts ) {
+        my $admin = $self->{admin};
+        @exts = $admin->load_all_extensions;
+    }
+
+    my %seen;
+    foreach my $obj ( @exts ) {
+        while (my ($method, $glob) = each %{ref($obj) . '::'}) {
+            next unless $obj->can($method);
+            next if $method =~ /^_/;
+            next if $method eq uc($method);
+            $seen{$method}++;
+        }
+    }
+
+    my $who = $self->_caller;
+    foreach my $name ( sort keys %seen ) {
+        *{"${who}::$name"} = sub {
+            ${"${who}::AUTOLOAD"} = "${who}::$name";
+            goto &{"${who}::AUTOLOAD"};
+        };
+    }
+}
+
+sub new {
+    my ($class, %args) = @_;
+
+    # ignore the prefix on extension modules built from top level.
+    my $base_path = Cwd::abs_path($FindBin::Bin);
+    unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
+        delete $args{prefix};
+    }
+
+    return $args{_self} if $args{_self};
+
+    $args{dispatch} ||= 'Admin';
+    $args{prefix}   ||= 'inc';
+    $args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
+    $args{bundle}   ||= 'inc/BUNDLES';
+    $args{base}     ||= $base_path;
+    $class =~ s/^\Q$args{prefix}\E:://;
+    $args{name}     ||= $class;
+    $args{version}  ||= $class->VERSION;
+    unless ( $args{path} ) {
+        $args{path}  = $args{name};
+        $args{path}  =~ s!::!/!g;
+    }
+    $args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
+
+    bless( \%args, $class );
+}
+
+sub call {
+	my ($self, $method) = @_;
+	my $obj = $self->load($method) or return;
+        splice(@_, 0, 2, $obj);
+	goto &{$obj->can($method)};
+}
+
+sub load {
+    my ($self, $method) = @_;
+
+    $self->load_extensions(
+        "$self->{prefix}/$self->{path}", $self
+    ) unless $self->{extensions};
+
+    foreach my $obj (@{$self->{extensions}}) {
+        return $obj if $obj->can($method);
+    }
+
+    my $admin = $self->{admin} or die <<"END_DIE";
+The '$method' method does not exist in the '$self->{prefix}' path!
+Please remove the '$self->{prefix}' directory and run $0 again to load it.
+END_DIE
+
+    my $obj = $admin->load($method, 1);
+    push @{$self->{extensions}}, $obj;
+
+    $obj;
+}
+
+sub load_extensions {
+    my ($self, $path, $top) = @_;
+
+    unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+        unshift @INC, $self->{prefix};
+    }
+
+    foreach my $rv ( $self->find_extensions($path) ) {
+        my ($file, $pkg) = @{$rv};
+        next if $self->{pathnames}{$pkg};
+
+        local $@;
+        my $new = eval { require $file; $pkg->can('new') };
+        unless ( $new ) {
+            warn $@ if $@;
+            next;
+        }
+        $self->{pathnames}{$pkg} = delete $INC{$file};
+        push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
+    }
+
+    $self->{extensions} ||= [];
+}
+
+sub find_extensions {
+    my ($self, $path) = @_;
+
+    my @found;
+    File::Find::find( sub {
+        my $file = $File::Find::name;
+        return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
+        my $subpath = $1;
+        return if lc($subpath) eq lc($self->{dispatch});
+
+        $file = "$self->{path}/$subpath.pm";
+        my $pkg = "$self->{name}::$subpath";
+        $pkg =~ s!/!::!g;
+
+        # If we have a mixed-case package name, assume case has been preserved
+        # correctly.  Otherwise, root through the file to locate the case-preserved
+        # version of the package name.
+        if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+            open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
+            my $in_pod = 0;
+            while ( <PKGFILE> ) {
+                $in_pod = 1 if /^=\w/;
+                $in_pod = 0 if /^=cut/;
+                next if ($in_pod || /^=cut/);  # skip pod text
+                next if /^\s*#/;               # and comments
+                if ( m/^\s*package\s+($pkg)\s*;/i ) {
+                    $pkg = $1;
+                    last;
+                }
+            }
+            close PKGFILE;
+        }
+
+        push @found, [ $file, $pkg ];
+    }, $path ) if -d $path;
+
+    @found;
+}
+
+sub _caller {
+    my $depth = 0;
+    my $call  = caller($depth);
+    while ( $call eq __PACKAGE__ ) {
+        $depth++;
+        $call = caller($depth);
+    }
+    return $call;
+}
+
+1;
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
new file mode 100644
index 0000000..81fbcb6
--- /dev/null
+++ b/inc/Module/Install/Base.pm
@@ -0,0 +1,70 @@
+#line 1
+package Module::Install::Base;
+
+$VERSION = '0.67';
+
+# Suspend handler for "redefined" warnings
+BEGIN {
+	my $w = $SIG{__WARN__};
+	$SIG{__WARN__} = sub { $w };
+}
+
+### This is the ONLY module that shouldn't have strict on
+# use strict;
+
+#line 41
+
+sub new {
+    my ($class, %args) = @_;
+
+    foreach my $method ( qw(call load) ) {
+        *{"$class\::$method"} = sub {
+            shift()->_top->$method(@_);
+        } unless defined &{"$class\::$method"};
+    }
+
+    bless( \%args, $class );
+}
+
+#line 61
+
+sub AUTOLOAD {
+    my $self = shift;
+    local $@;
+    my $autoload = eval { $self->_top->autoload } or return;
+    goto &$autoload;
+}
+
+#line 76
+
+sub _top { $_[0]->{_top} }
+
+#line 89
+
+sub admin {
+    $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
+}
+
+sub is_admin {
+    $_[0]->admin->VERSION;
+}
+
+sub DESTROY {}
+
+package Module::Install::Base::FakeAdmin;
+
+my $Fake;
+sub new { $Fake ||= bless(\@_, $_[0]) }
+
+sub AUTOLOAD {}
+
+sub DESTROY {}
+
+# Restore warning handler
+BEGIN {
+	$SIG{__WARN__} = $SIG{__WARN__}->();
+}
+
+1;
+
+#line 138
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
new file mode 100644
index 0000000..5d1eab8
--- /dev/null
+++ b/inc/Module/Install/Can.pm
@@ -0,0 +1,82 @@
+#line 1
+package Module::Install::Can;
+
+use strict;
+use Module::Install::Base;
+use Config ();
+### This adds a 5.005 Perl version dependency.
+### This is a bug and will be fixed.
+use File::Spec ();
+use ExtUtils::MakeMaker ();
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.67';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+# check if we can load some module
+### Upgrade this to not have to load the module if possible
+sub can_use {
+	my ($self, $mod, $ver) = @_;
+	$mod =~ s{::|\\}{/}g;
+	$mod .= '.pm' unless $mod =~ /\.pm$/i;
+
+	my $pkg = $mod;
+	$pkg =~ s{/}{::}g;
+	$pkg =~ s{\.pm$}{}i;
+
+	local $@;
+	eval { require $mod; $pkg->VERSION($ver || 0); 1 };
+}
+
+# check if we can run some command
+sub can_run {
+	my ($self, $cmd) = @_;
+
+	my $_cmd = $cmd;
+	return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
+
+	for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+		my $abs = File::Spec->catfile($dir, $_[1]);
+		return $abs if (-x $abs or $abs = MM->maybe_command($abs));
+	}
+
+	return;
+}
+
+# can we locate a (the) C compiler
+sub can_cc {
+	my $self   = shift;
+	my @chunks = split(/ /, $Config::Config{cc}) or return;
+
+	# $Config{cc} may contain args; try to find out the program part
+	while (@chunks) {
+		return $self->can_run("@chunks") || (pop(@chunks), next);
+	}
+
+	return;
+}
+
+# Fix Cygwin bug on maybe_command();
+if ( $^O eq 'cygwin' ) {
+	require ExtUtils::MM_Cygwin;
+	require ExtUtils::MM_Win32;
+	if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
+		*ExtUtils::MM_Cygwin::maybe_command = sub {
+			my ($self, $file) = @_;
+			if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
+				ExtUtils::MM_Win32->maybe_command($file);
+			} else {
+				ExtUtils::MM_Unix->maybe_command($file);
+			}
+		}
+	}
+}
+
+1;
+
+__END__
+
+#line 157
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
new file mode 100644
index 0000000..e884477
--- /dev/null
+++ b/inc/Module/Install/Fetch.pm
@@ -0,0 +1,93 @@
+#line 1
+package Module::Install::Fetch;
+
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.67';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub get_file {
+    my ($self, %args) = @_;
+    my ($scheme, $host, $path, $file) = 
+        $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
+
+    if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
+        $args{url} = $args{ftp_url}
+            or (warn("LWP support unavailable!\n"), return);
+        ($scheme, $host, $path, $file) = 
+            $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
+    }
+
+    $|++;
+    print "Fetching '$file' from $host... ";
+
+    unless (eval { require Socket; Socket::inet_aton($host) }) {
+        warn "'$host' resolve failed!\n";
+        return;
+    }
+
+    return unless $scheme eq 'ftp' or $scheme eq 'http';
+
+    require Cwd;
+    my $dir = Cwd::getcwd();
+    chdir $args{local_dir} or return if exists $args{local_dir};
+
+    if (eval { require LWP::Simple; 1 }) {
+        LWP::Simple::mirror($args{url}, $file);
+    }
+    elsif (eval { require Net::FTP; 1 }) { eval {
+        # use Net::FTP to get past firewall
+        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
+        $ftp->login("anonymous", 'anonymous at example.com');
+        $ftp->cwd($path);
+        $ftp->binary;
+        $ftp->get($file) or (warn("$!\n"), return);
+        $ftp->quit;
+    } }
+    elsif (my $ftp = $self->can_run('ftp')) { eval {
+        # no Net::FTP, fallback to ftp.exe
+        require FileHandle;
+        my $fh = FileHandle->new;
+
+        local $SIG{CHLD} = 'IGNORE';
+        unless ($fh->open("|$ftp -n")) {
+            warn "Couldn't open ftp: $!\n";
+            chdir $dir; return;
+        }
+
+        my @dialog = split(/\n/, <<"END_FTP");
+open $host
+user anonymous anonymous\@example.com
+cd $path
+binary
+get $file $file
+quit
+END_FTP
+        foreach (@dialog) { $fh->print("$_\n") }
+        $fh->close;
+    } }
+    else {
+        warn "No working 'ftp' program available!\n";
+        chdir $dir; return;
+    }
+
+    unless (-f $file) {
+        warn "Fetching failed: $@\n";
+        chdir $dir; return;
+    }
+
+    return if exists $args{size} and -s $file != $args{size};
+    system($args{run}) if exists $args{run};
+    unlink($file) if $args{remove};
+
+    print(((!exists $args{check_for} or -e $args{check_for})
+        ? "done!" : "failed! ($!)"), "\n");
+    chdir $dir; return !$?;
+}
+
+1;
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
new file mode 100644
index 0000000..fbc5cb2
--- /dev/null
+++ b/inc/Module/Install/Makefile.pm
@@ -0,0 +1,237 @@
+#line 1
+package Module::Install::Makefile;
+
+use strict 'vars';
+use Module::Install::Base;
+use ExtUtils::MakeMaker ();
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.67';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub Makefile { $_[0] }
+
+my %seen = ();
+
+sub prompt {
+	shift;
+
+	# Infinite loop protection
+	my @c = caller();
+	if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+		die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+	}
+
+	# In automated testing, always use defaults
+	if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+		local $ENV{PERL_MM_USE_DEFAULT} = 1;
+		goto &ExtUtils::MakeMaker::prompt;
+	} else {
+		goto &ExtUtils::MakeMaker::prompt;
+	}
+}
+
+sub makemaker_args {
+	my $self = shift;
+	my $args = ($self->{makemaker_args} ||= {});
+	%$args = ( %$args, @_ ) if @_;
+	$args;
+}
+
+# For mm args that take multiple space-seperated args,
+# append an argument to the current list.
+sub makemaker_append {
+	my $self = sShift;
+	my $name = shift;
+	my $args = $self->makemaker_args;
+	$args->{name} = defined $args->{$name}
+		? join( ' ', $args->{name}, @_ )
+		: join( ' ', @_ );
+}
+
+sub build_subdirs {
+	my $self    = shift;
+	my $subdirs = $self->makemaker_args->{DIR} ||= [];
+	for my $subdir (@_) {
+		push @$subdirs, $subdir;
+	}
+}
+
+sub clean_files {
+	my $self  = shift;
+	my $clean = $self->makemaker_args->{clean} ||= {};
+	%$clean = (
+		%$clean, 
+		FILES => join(' ', grep length, $clean->{FILES}, @_),
+	);
+}
+
+sub realclean_files {
+	my $self  = shift;
+	my $realclean = $self->makemaker_args->{realclean} ||= {};
+	%$realclean = (
+		%$realclean, 
+		FILES => join(' ', grep length, $realclean->{FILES}, @_),
+	);
+}
+
+sub libs {
+	my $self = shift;
+	my $libs = ref $_[0] ? shift : [ shift ];
+	$self->makemaker_args( LIBS => $libs );
+}
+
+sub inc {
+	my $self = shift;
+	$self->makemaker_args( INC => shift );
+}
+
+my %test_dir = ();
+
+sub _wanted_t {
+	/\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
+}
+
+sub tests_recursive {
+	my $self = shift;
+	if ( $self->tests ) {
+		die "tests_recursive will not work if tests are already defined";
+	}
+	my $dir = shift || 't';
+	unless ( -d $dir ) {
+		die "tests_recursive dir '$dir' does not exist";
+	}
+	require File::Find;
+	%test_dir = ();
+	File::Find::find( \&_wanted_t, $dir );
+	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
+}
+
+sub write {
+	my $self = shift;
+	die "&Makefile->write() takes no arguments\n" if @_;
+
+	my $args = $self->makemaker_args;
+	$args->{DISTNAME} = $self->name;
+	$args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
+	$args->{VERSION}  = $self->version || $self->determine_VERSION($args);
+	$args->{NAME}     =~ s/-/::/g;
+	if ( $self->tests ) {
+		$args->{test} = { TESTS => $self->tests };
+	}
+	if ($] >= 5.005) {
+		$args->{ABSTRACT} = $self->abstract;
+		$args->{AUTHOR}   = $self->author;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+		$args->{NO_META} = 1;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+		$args->{SIGN} = 1;
+	}
+	unless ( $self->is_admin ) {
+		delete $args->{SIGN};
+	}
+
+	# merge both kinds of requires into prereq_pm
+	my $prereq = ($args->{PREREQ_PM} ||= {});
+	%$prereq = ( %$prereq,
+		map { @$_ }
+		map { @$_ }
+		grep $_,
+		($self->build_requires, $self->requires)
+	);
+
+	# merge both kinds of requires into prereq_pm
+	my $subdirs = ($args->{DIR} ||= []);
+	if ($self->bundles) {
+		foreach my $bundle (@{ $self->bundles }) {
+			my ($file, $dir) = @$bundle;
+			push @$subdirs, $dir if -d $dir;
+			delete $prereq->{$file};
+		}
+	}
+
+	if ( my $perl_version = $self->perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	$args->{INSTALLDIRS} = $self->installdirs;
+
+	my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
+
+	my $user_preop = delete $args{dist}->{PREOP};
+	if (my $preop = $self->admin->preop($user_preop)) {
+		$args{dist} = $preop;
+	}
+
+	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+	$self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+}
+
+sub fix_up_makefile {
+	my $self          = shift;
+	my $makefile_name = shift;
+	my $top_class     = ref($self->_top) || '';
+	my $top_version   = $self->_top->VERSION || '';
+
+	my $preamble = $self->preamble 
+		? "# Preamble by $top_class $top_version\n"
+			. $self->preamble
+		: '';
+	my $postamble = "# Postamble by $top_class $top_version\n"
+		. ($self->postamble || '');
+
+	local *MAKEFILE;
+	open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	my $makefile = do { local $/; <MAKEFILE> };
+	close MAKEFILE or die $!;
+
+	$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
+	$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
+	$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+	$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+	$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+	# Module::Install will never be used to build the Core Perl
+	# Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+	# PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+	$makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+	#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+	# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+	$makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+
+	# XXX - This is currently unused; not sure if it breaks other MM-users
+	# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+	open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	print MAKEFILE  "$preamble$makefile$postamble" or die $!;
+	close MAKEFILE  or die $!;
+
+	1;
+}
+
+sub preamble {
+	my ($self, $text) = @_;
+	$self->{preamble} = $text . $self->{preamble} if defined $text;
+	$self->{preamble};
+}
+
+sub postamble {
+	my ($self, $text) = @_;
+	$self->{postamble} ||= $self->admin->postamble;
+	$self->{postamble} .= $text if defined $text;
+	$self->{postamble}
+}
+
+1;
+
+__END__
+
+#line 363
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
new file mode 100644
index 0000000..b886046
--- /dev/null
+++ b/inc/Module/Install/Metadata.pm
@@ -0,0 +1,336 @@
+#line 1
+package Module::Install::Metadata;
+
+use strict 'vars';
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.67';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+my @scalar_keys = qw{
+    name module_name abstract author version license
+    distribution_type perl_version tests installdirs
+};
+
+my @tuple_keys = qw{
+    build_requires requires recommends bundles
+};
+
+sub Meta            { shift        }
+sub Meta_ScalarKeys { @scalar_keys }
+sub Meta_TupleKeys  { @tuple_keys  }
+
+foreach my $key (@scalar_keys) {
+    *$key = sub {
+        my $self = shift;
+        return $self->{values}{$key} if defined wantarray and !@_;
+        $self->{values}{$key} = shift;
+        return $self;
+    };
+}
+
+foreach my $key (@tuple_keys) {
+    *$key = sub {
+        my $self = shift;
+        return $self->{values}{$key} unless @_;
+
+        my @rv;
+        while (@_) {
+            my $module = shift or last;
+            my $version = shift || 0;
+            if ( $module eq 'perl' ) {
+                $version =~ s{^(\d+)\.(\d+)\.(\d+)}
+                             {$1 + $2/1_000 + $3/1_000_000}e;
+                $self->perl_version($version);
+                next;
+            }
+            my $rv = [ $module, $version ];
+            push @rv, $rv;
+        }
+        push @{ $self->{values}{$key} }, @rv;
+        @rv;
+    };
+}
+
+# configure_requires is currently a null-op
+sub configure_requires { 1 }
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires      { shift->build_requires(@_)  }
+sub install_requires   { shift->build_requires(@_)  }
+
+# Aliases for installdirs options
+sub install_as_core    { $_[0]->installdirs('perl')   }
+sub install_as_cpan    { $_[0]->installdirs('site')   }
+sub install_as_site    { $_[0]->installdirs('site')   }
+sub install_as_vendor  { $_[0]->installdirs('vendor') }
+
+sub sign {
+    my $self = shift;
+    return $self->{'values'}{'sign'} if defined wantarray and ! @_;
+    $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
+    return $self;
+}
+
+sub dynamic_config {
+	my $self = shift;
+	unless ( @_ ) {
+		warn "You MUST provide an explicit true/false value to dynamic_config, skipping\n";
+		return $self;
+	}
+	$self->{'values'}{'dynamic_config'} = $_[0] ? 1 : 0;
+	return $self;
+}
+
+sub all_from {
+    my ( $self, $file ) = @_;
+
+    unless ( defined($file) ) {
+        my $name = $self->name
+            or die "all_from called with no args without setting name() first";
+        $file = join('/', 'lib', split(/-/, $name)) . '.pm';
+        $file =~ s{.*/}{} unless -e $file;
+        die "all_from: cannot find $file from $name" unless -e $file;
+    }
+
+    $self->version_from($file)      unless $self->version;
+    $self->perl_version_from($file) unless $self->perl_version;
+
+    # The remaining probes read from POD sections; if the file
+    # has an accompanying .pod, use that instead
+    my $pod = $file;
+    if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
+        $file = $pod;
+    }
+
+    $self->author_from($file)   unless $self->author;
+    $self->license_from($file)  unless $self->license;
+    $self->abstract_from($file) unless $self->abstract;
+}
+
+sub provides {
+    my $self     = shift;
+    my $provides = ( $self->{values}{provides} ||= {} );
+    %$provides = (%$provides, @_) if @_;
+    return $provides;
+}
+
+sub auto_provides {
+    my $self = shift;
+    return $self unless $self->is_admin;
+
+    unless (-e 'MANIFEST') {
+        warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
+        return $self;
+    }
+
+    # Avoid spurious warnings as we are not checking manifest here.
+
+    local $SIG{__WARN__} = sub {1};
+    require ExtUtils::Manifest;
+    local *ExtUtils::Manifest::manicheck = sub { return };
+
+    require Module::Build;
+    my $build = Module::Build->new(
+        dist_name    => $self->name,
+        dist_version => $self->version,
+        license      => $self->license,
+    );
+    $self->provides(%{ $build->find_dist_packages || {} });
+}
+
+sub feature {
+    my $self     = shift;
+    my $name     = shift;
+    my $features = ( $self->{values}{features} ||= [] );
+
+    my $mods;
+
+    if ( @_ == 1 and ref( $_[0] ) ) {
+        # The user used ->feature like ->features by passing in the second
+        # argument as a reference.  Accomodate for that.
+        $mods = $_[0];
+    } else {
+        $mods = \@_;
+    }
+
+    my $count = 0;
+    push @$features, (
+        $name => [
+            map {
+                ref($_) ? ( ref($_) eq 'HASH' ) ? %$_
+                                                : @$_
+                        : $_
+            } @$mods
+        ]
+    );
+
+    return @$features;
+}
+
+sub features {
+    my $self = shift;
+    while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
+        $self->feature( $name, @$mods );
+    }
+    return $self->{values}->{features}
+    	? @{ $self->{values}->{features} }
+    	: ();
+}
+
+sub no_index {
+    my $self = shift;
+    my $type = shift;
+    push @{ $self->{values}{no_index}{$type} }, @_ if $type;
+    return $self->{values}{no_index};
+}
+
+sub read {
+    my $self = shift;
+    $self->include_deps( 'YAML', 0 );
+
+    require YAML;
+    my $data = YAML::LoadFile('META.yml');
+
+    # Call methods explicitly in case user has already set some values.
+    while ( my ( $key, $value ) = each %$data ) {
+        next unless $self->can($key);
+        if ( ref $value eq 'HASH' ) {
+            while ( my ( $module, $version ) = each %$value ) {
+                $self->can($key)->($self, $module => $version );
+            }
+        }
+        else {
+            $self->can($key)->($self, $value);
+        }
+    }
+    return $self;
+}
+
+sub write {
+    my $self = shift;
+    return $self unless $self->is_admin;
+    $self->admin->write_meta;
+    return $self;
+}
+
+sub version_from {
+    my ( $self, $file ) = @_;
+    require ExtUtils::MM_Unix;
+    $self->version( ExtUtils::MM_Unix->parse_version($file) );
+}
+
+sub abstract_from {
+    my ( $self, $file ) = @_;
+    require ExtUtils::MM_Unix;
+    $self->abstract(
+        bless(
+            { DISTNAME => $self->name },
+            'ExtUtils::MM_Unix'
+        )->parse_abstract($file)
+     );
+}
+
+sub _slurp {
+    my ( $self, $file ) = @_;
+
+    local *FH;
+    open FH, "< $file" or die "Cannot open $file.pod: $!";
+    do { local $/; <FH> };
+}
+
+sub perl_version_from {
+    my ( $self, $file ) = @_;
+
+    if (
+        $self->_slurp($file) =~ m/
+        ^
+        use \s*
+        v?
+        ([\d_\.]+)
+        \s* ;
+    /ixms
+      )
+    {
+        my $v = $1;
+        $v =~ s{_}{}g;
+        $self->perl_version($1);
+    }
+    else {
+        warn "Cannot determine perl version info from $file\n";
+        return;
+    }
+}
+
+sub author_from {
+    my ( $self, $file ) = @_;
+    my $content = $self->_slurp($file);
+    if ($content =~ m/
+        =head \d \s+ (?:authors?)\b \s*
+        ([^\n]*)
+        |
+        =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
+        .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
+        ([^\n]*)
+    /ixms) {
+        my $author = $1 || $2;
+        $author =~ s{E<lt>}{<}g;
+        $author =~ s{E<gt>}{>}g;
+        $self->author($author); 
+    }
+    else {
+        warn "Cannot determine author info from $file\n";
+    }
+}
+
+sub license_from {
+    my ( $self, $file ) = @_;
+
+    if (
+        $self->_slurp($file) =~ m/
+        (
+            =head \d \s+
+            (?:licen[cs]e|licensing|copyright|legal)\b
+            .*?
+        )
+        (=head\\d.*|=cut.*|)
+        \z
+    /ixms
+      )
+    {
+        my $license_text = $1;
+        my @phrases      = (
+            'under the same (?:terms|license) as perl itself' => 'perl',        1,
+            'GNU public license'                              => 'gpl',         1,
+            'GNU lesser public license'                       => 'gpl',         1,
+            'BSD license'                                     => 'bsd',         1,
+            'Artistic license'                                => 'artistic',    1,
+            'GPL'                                             => 'gpl',         1,
+            'LGPL'                                            => 'lgpl',        1,
+            'BSD'                                             => 'bsd',         1,
+            'Artistic'                                        => 'artistic',    1,
+            'MIT'                                             => 'mit',         1,
+            'proprietary'                                     => 'proprietary', 0,
+        );
+        while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
+            $pattern =~ s{\s+}{\\s+}g;
+            if ( $license_text =~ /\b$pattern\b/i ) {
+                if ( $osi and $license_text =~ /All rights reserved/i ) {
+                        warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+		}
+                $self->license($license);
+                return 1;
+            }
+        }
+    }
+
+    warn "Cannot determine license info from $file\n";
+    return 'unknown';
+}
+
+1;
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
new file mode 100644
index 0000000..ae565f4
--- /dev/null
+++ b/inc/Module/Install/RTx.pm
@@ -0,0 +1,158 @@
+#line 1
+package Module::Install::RTx;
+use Module::Install::Base; @ISA = qw(Module::Install::Base);
+
+$Module::Install::RTx::VERSION = '0.11';
+
+use strict;
+use FindBin;
+use File::Glob ();
+use File::Basename ();
+
+sub RTx {
+    my ($self, $name) = @_;
+    my $RTx = 'RTx';
+    $RTx = $1 if $name =~ s/^(\w+)-//;
+    my $fname = $name;
+    $fname =~ s!-!/!g;
+
+    $self->name("$RTx-$name")
+        unless $self->name;
+    $self->abstract("RT $name Extension")
+        unless $self->abstract;
+    $self->version_from (-e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm")
+        unless $self->version;
+
+    my @prefixes = (qw(/opt /usr/local /home /usr /sw ));
+    my $prefix = $ENV{PREFIX};
+    @ARGV = grep { /PREFIX=(.*)/ ? (($prefix = $1), 0) : 1 } @ARGV;
+
+    if ($prefix) {
+        $RT::LocalPath = $prefix;
+        $INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm";
+    }
+    else {
+        local @INC = (
+            @INC,
+            $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : (),
+            map {( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" )} grep $_, @prefixes
+        );
+        until ( eval { require RT; $RT::LocalPath } ) {
+            warn "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @INC\n";
+            $_ = $self->prompt("Path to your RT.pm:") or exit;
+            push @INC, $_, "$_/rt3/lib", "$_/lib/rt3";
+        }
+    }
+
+    my $lib_path = File::Basename::dirname($INC{'RT.pm'});
+    print "Using RT configurations from $INC{'RT.pm'}:\n";
+
+    $RT::LocalVarPath	||= $RT::VarPath;
+    $RT::LocalPoPath	||= $RT::LocalLexiconPath;
+    $RT::LocalHtmlPath	||= $RT::MasonComponentRoot;
+
+    my %path;
+    my $with_subdirs = $ENV{WITH_SUBDIRS};
+    @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? (($with_subdirs = $1), 0) : 1 } @ARGV;
+    my %subdirs = map { $_ => 1 } split(/\s*,\s*/, $with_subdirs);
+
+    foreach (qw(bin etc html po sbin var)) {
+        next unless -d "$FindBin::Bin/$_";
+        next if %subdirs and !$subdirs{$_};
+        $self->no_index( directory => $_ );
+
+        no strict 'refs';
+        my $varname = "RT::Local" . ucfirst($_) . "Path";
+        $path{$_} = ${$varname} || "$RT::LocalPath/$_";
+    }
+
+    $path{$_} .= "/$name" for grep $path{$_}, qw(etc po var);
+    my $args = join(', ', map "q($_)", %path);
+    $path{lib} = "$RT::LocalPath/lib" unless %subdirs and !$subdirs{'lib'};
+    print "./$_\t=> $path{$_}\n" for sort keys %path;
+
+    if (my @dirs = map { (-D => $_) } grep $path{$_}, qw(bin html sbin)) {
+        my @po = map { (-o => $_) } grep -f, File::Glob::bsd_glob("po/*.po");
+        $self->postamble(<< ".") if @po;
+lexicons ::
+\t\$(NOECHO) \$(PERL) -MLocale::Maketext::Extract::Run=xgettext -e \"xgettext(qw(@dirs @po))\"
+.
+    }
+
+    my $postamble = << ".";
+install ::
+\t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
+.
+
+    if ($path{var} and -d $RT::MasonDataDir) {
+        my ($uid, $gid) = (stat($RT::MasonDataDir))[4, 5];
+        $postamble .= << ".";
+\t\$(NOECHO) chown -R $uid:$gid $path{var}
+.
+    }
+
+    my %has_etc;
+    if (File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*")) {
+        # got schema, load factory module
+        $has_etc{schema}++;
+        $self->load('RTxFactory');
+        $self->postamble(<< ".");
+factory ::
+\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name))"
+
+dropdb ::
+\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name drop))"
+
+.
+    }
+    if (File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*")) {
+        $has_etc{acl}++;
+    }
+    if (-e 'etc/initialdata') {
+        $has_etc{initialdata}++;
+    }
+
+    $self->postamble("$postamble\n");
+    if (%subdirs and !$subdirs{'lib'}) {
+        $self->makemaker_args(
+            PM => { "" => "" },
+        )
+    }
+    else {
+        $self->makemaker_args( INSTALLSITELIB => "$RT::LocalPath/lib" );
+    }
+
+    if (%has_etc) {
+        $self->load('RTxInitDB');
+        print "For first-time installation, type 'make initdb'.\n";
+        my $initdb = '';
+        $initdb .= <<"." if $has_etc{schema};
+\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema))"
+.
+        $initdb .= <<"." if $has_etc{acl};
+\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl))"
+.
+        $initdb .= <<"." if $has_etc{initialdata};
+\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert))"
+.
+        $self->postamble("initdb ::\n$initdb\n");
+        $self->postamble("initialize-database ::\n$initdb\n");
+    }
+}
+
+sub RTxInit {
+    unshift @INC, substr(delete($INC{'RT.pm'}), 0, -5) if $INC{'RT.pm'};
+    require RT;
+    RT::LoadConfig();
+    RT::ConnectToDatabase();
+
+    die "Cannot load RT" unless $RT::Handle and $RT::DatabaseType;
+}
+
+1;
+
+__END__
+
+#line 220
+
+#line 241
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
new file mode 100644
index 0000000..612dc30
--- /dev/null
+++ b/inc/Module/Install/Win32.pm
@@ -0,0 +1,65 @@
+#line 1
+package Module::Install::Win32;
+
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.67';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+# determine if the user needs nmake, and download it if needed
+sub check_nmake {
+	my $self = shift;
+	$self->load('can_run');
+	$self->load('get_file');
+	
+	require Config;
+	return unless (
+		$^O eq 'MSWin32'                     and
+		$Config::Config{make}                and
+		$Config::Config{make} =~ /^nmake\b/i and
+		! $self->can_run('nmake')
+	);
+
+	print "The required 'nmake' executable not found, fetching it...\n";
+
+	require File::Basename;
+	my $rv = $self->get_file(
+		url       => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
+		ftp_url   => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
+		local_dir => File::Basename::dirname($^X),
+		size      => 51928,
+		run       => 'Nmake15.exe /o > nul',
+		check_for => 'Nmake.exe',
+		remove    => 1,
+	);
+
+	if (!$rv) {
+        die <<'END_MESSAGE';
+
+-------------------------------------------------------------------------------
+
+Since you are using Microsoft Windows, you will need the 'nmake' utility
+before installation. It's available at:
+
+  http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
+      or
+  ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
+
+Please download the file manually, save it to a directory in %PATH% (e.g.
+C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
+that directory, and run "Nmake15.exe" from there; that will create the
+'nmake.exe' file needed by this module.
+
+You may then resume the installation process described in README.
+
+-------------------------------------------------------------------------------
+END_MESSAGE
+	}
+}
+
+1;
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
new file mode 100644
index 0000000..e1db381
--- /dev/null
+++ b/inc/Module/Install/WriteAll.pm
@@ -0,0 +1,43 @@
+#line 1
+package Module::Install::WriteAll;
+
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.67';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub WriteAll {
+    my $self = shift;
+    my %args = (
+        meta        => 1,
+        sign        => 0,
+        inline      => 0,
+        check_nmake => 1,
+        @_
+    );
+
+    $self->sign(1)                if $args{sign};
+    $self->Meta->write            if $args{meta};
+    $self->admin->WriteAll(%args) if $self->is_admin;
+
+    if ( $0 =~ /Build.PL$/i ) {
+        $self->Build->write;
+    } else {
+        $self->check_nmake if $args{check_nmake};
+        unless ( $self->makemaker_args->{'PL_FILES'} ) {
+        	$self->makemaker_args( PL_FILES => {} );
+        }
+        if ($args{inline}) {
+            $self->Inline->write;
+        } else {
+            $self->Makefile->write;
+        }
+    }
+}
+
+1;
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
new file mode 100644
index 0000000..5683d0f
--- /dev/null
+++ b/lib/RT/Extension/FormTools.pm
@@ -0,0 +1,6 @@
+use warnings;
+use strict;
+
+package RT::Extension::FormTools;
+
+1;

commit 39359807e42c15ab6101471b660158e51db1f548
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Dec 17 19:58:05 2007 +0000

     * releng cleanup

diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..3cc83a5
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,17 @@
+html/FormTools/Field
+html/FormTools/Form
+html/FormTools/Next
+html/FormTools/ShowChoices
+inc/Module/Install.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/RTx.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/RT/Extension/FormTools.pm
+Makefile.PL
+MANIFEST			This list of files
+META.yml
diff --git a/META.yml b/META.yml
deleted file mode 100644
index d2ea796..0000000
--- a/META.yml
+++ /dev/null
@@ -1,16 +0,0 @@
---- 
-abstract: RT Extension-FormTools Extension
-distribution_type: module
-generated_by: Module::Install version 0.67
-license: unknown
-meta-spec: 
-  url: http://module-build.sourceforge.net/META-spec-v1.3.html
-  version: 1.3
-name: RT-Extension-FormTools
-no_index: 
-  directory: 
-    - etc
-    - html
-    - inc
-    - t
-version: undef
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 70a3278..0000000
--- a/Makefile
+++ /dev/null
@@ -1,793 +0,0 @@
-# This Makefile is for the RT::Extension::FormTools extension to perl.
-#
-# It was generated automatically by MakeMaker version
-# 6.31 (Revision: 19606) from the contents of
-# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
-#
-#       ANY CHANGES MADE HERE WILL BE LOST!
-#
-#   MakeMaker ARGV: ()
-#
-#   MakeMaker Parameters:
-
-#     ABSTRACT => q[RT Extension-FormTools Extension]
-#     DIR => []
-#     DISTNAME => q[RT-Extension-FormTools]
-#     INSTALLSITELIB => q[/opt/rt3/local/lib]
-#     NAME => q[RT::Extension::FormTools]
-#     NO_META => q[1]
-#     PL_FILES => {  }
-#     PREREQ_PM => {  }
-#     VERSION => q[undef]
-#     dist => {  }
-
-# --- MakeMaker post_initialize section:
-
-
-# --- MakeMaker const_config section:
-
-# These definitions are from config.sh (via /opt/local/lib/perl5/5.8.8/darwin-2level/Config.pm)
-
-# They may have been overridden via Makefile.PL or on the command line
-AR = ar
-CC = /usr/bin/gcc-4.0
-CCCDLFLAGS =  
-CCDLFLAGS =  
-DLEXT = bundle
-DLSRC = dl_dlopen.xs
-EXE_EXT = 
-FULL_AR = /usr/bin/ar
-LD = env MACOSX_DEPLOYMENT_TARGET=10.3 cc
-LDDLFLAGS = -L/opt/local/lib -bundle -undefined dynamic_lookup
-LDFLAGS = -L/opt/local/lib
-LIBC = /usr/lib/libc.dylib
-LIB_EXT = .a
-OBJ_EXT = .o
-OSNAME = darwin
-OSVERS = 8.6.2
-RANLIB = ranlib
-SITELIBEXP = /opt/local/lib/perl5/site_perl/5.8.8
-SITEARCHEXP = /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
-SO = dylib
-VENDORARCHEXP = /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
-VENDORLIBEXP = /opt/local/lib/perl5/vendor_perl/5.8.8
-
-
-# --- MakeMaker constants section:
-AR_STATIC_ARGS = cr
-DIRFILESEP = /
-DFSEP = $(DIRFILESEP)
-NAME = RT::Extension::FormTools
-NAME_SYM = RT_Extension_FormTools
-VERSION = undef
-VERSION_MACRO = VERSION
-VERSION_SYM = undef
-DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
-XS_VERSION = undef
-XS_VERSION_MACRO = XS_VERSION
-XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
-INST_ARCHLIB = blib/arch
-INST_SCRIPT = blib/script
-INST_BIN = blib/bin
-INST_LIB = blib/lib
-INST_MAN1DIR = blib/man1
-INST_MAN3DIR = blib/man3
-MAN1EXT = 1
-MAN3EXT = 3
-INSTALLDIRS = site
-DESTDIR = 
-PREFIX = $(SITEPREFIX)
-PERLPREFIX = /opt/local
-SITEPREFIX = /opt/local
-VENDORPREFIX = /opt/local
-INSTALLPRIVLIB = /opt/local/lib/perl5/5.8.8
-DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
-INSTALLSITELIB = /opt/rt3/local/lib
-DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
-INSTALLVENDORLIB = /opt/local/lib/perl5/vendor_perl/5.8.8
-DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
-INSTALLARCHLIB = /opt/local/lib/perl5/5.8.8/darwin-2level
-DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
-INSTALLSITEARCH = /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
-DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
-INSTALLVENDORARCH = /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
-DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
-INSTALLBIN = /opt/local/bin
-DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
-INSTALLSITEBIN = /opt/local/bin
-DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
-INSTALLVENDORBIN = /opt/local/bin
-DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
-INSTALLSCRIPT = /opt/local/bin
-DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
-INSTALLSITESCRIPT = /opt/local/bin
-DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
-INSTALLVENDORSCRIPT = /opt/local/bin
-DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
-INSTALLMAN1DIR = /opt/local/share/man/man1
-DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
-INSTALLSITEMAN1DIR = /opt/local/share/man/man1
-DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
-INSTALLVENDORMAN1DIR = /opt/local/share/man/man1
-DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
-INSTALLMAN3DIR = /opt/local/share/man/man3
-DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
-INSTALLSITEMAN3DIR = /opt/local/share/man/man3
-DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
-INSTALLVENDORMAN3DIR = /opt/local/share/man/man3
-DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
-PERL_LIB =
-PERL_ARCHLIB = /opt/local/lib/perl5/5.8.8/darwin-2level
-LIBPERL_A = libperl.a
-FIRST_MAKEFILE = Makefile
-MAKEFILE_OLD = Makefile.old
-MAKE_APERL_FILE = Makefile.aperl
-PERLMAINCC = $(CC)
-PERL_INC = /opt/local/lib/perl5/5.8.8/darwin-2level/CORE
-PERL = /opt/local/bin/perl "-Iinc"
-FULLPERL = /opt/local/bin/perl "-Iinc"
-ABSPERL = $(PERL)
-PERLRUN = $(PERL)
-FULLPERLRUN = $(FULLPERL)
-ABSPERLRUN = $(ABSPERL)
-PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)"
-FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)"
-ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)"
-PERL_CORE = 0
-PERM_RW = 644
-PERM_RWX = 755
-
-MAKEMAKER   = /opt/local/lib/perl5/5.8.8/ExtUtils/MakeMaker.pm
-MM_VERSION  = 6.31
-MM_REVISION = 19606
-
-# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
-# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
-# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
-# DLBASE  = Basename part of dynamic library. May be just equal BASEEXT.
-MAKE = make
-FULLEXT = RT/Extension/FormTools
-BASEEXT = FormTools
-PARENT_NAME = RT::Extension
-DLBASE = $(BASEEXT)
-VERSION_FROM = 
-OBJECT = 
-LDFROM = $(OBJECT)
-LINKTYPE = dynamic
-BOOTDEP = 
-
-# Handy lists of source code files:
-XS_FILES = 
-C_FILES  = 
-O_FILES  = 
-H_FILES  = 
-MAN1PODS = 
-MAN3PODS = 
-
-# Where is the Config information that we are using/depend on
-CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
-
-# Where to build things
-INST_LIBDIR      = $(INST_LIB)/RT/Extension
-INST_ARCHLIBDIR  = $(INST_ARCHLIB)/RT/Extension
-
-INST_AUTODIR     = $(INST_LIB)/auto/$(FULLEXT)
-INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
-
-INST_STATIC      = 
-INST_DYNAMIC     = 
-INST_BOOT        = 
-
-# Extra linker info
-EXPORT_LIST        = 
-PERL_ARCHIVE       = 
-PERL_ARCHIVE_AFTER = 
-
-
-TO_INST_PM = lib/RT/Extension/FormTools.pm \
-	lib/RT/FormTools/Flow.pm
-
-PM_TO_BLIB = lib/RT/FormTools/Flow.pm \
-	blib/lib/RT/FormTools/Flow.pm \
-	lib/RT/Extension/FormTools.pm \
-	blib/lib/RT/Extension/FormTools.pm
-
-
-# --- MakeMaker platform_constants section:
-MM_Unix_VERSION = 1.51
-PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
-
-
-# --- MakeMaker tool_autosplit section:
-# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = $(ABSPERLRUN)  -e 'use AutoSplit;  autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
-
-
-
-# --- MakeMaker tool_xsubpp section:
-
-
-# --- MakeMaker tools_other section:
-SHELL = /bin/sh
-CHMOD = chmod
-CP = cp
-MV = mv
-NOOP = $(SHELL) -c true
-NOECHO = @
-RM_F = rm -f
-RM_RF = rm -rf
-TEST_F = test -f
-TOUCH = touch
-UMASK_NULL = umask 0
-DEV_NULL = > /dev/null 2>&1
-MKPATH = $(ABSPERLRUN) "-MExtUtils::Command" -e mkpath
-EQUALIZE_TIMESTAMP = $(ABSPERLRUN) "-MExtUtils::Command" -e eqtime
-ECHO = echo
-ECHO_N = echo -n
-UNINST = 0
-VERBINST = 0
-MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install({@ARGV}, '\''$(VERBINST)'\'', 0, '\''$(UNINST)'\'');' --
-DOC_INSTALL = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e perllocal_install
-UNINSTALL = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e uninstall
-WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist
-MACROSTART = 
-MACROEND = 
-USEMAKEFILE = -f
-FIXIN = $(PERLRUN) "-MExtUtils::MY" -e "MY->fixin(shift)"
-
-
-# --- MakeMaker makemakerdflt section:
-makemakerdflt: all
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker dist section:
-TAR = tar
-TARFLAGS = cvf
-ZIP = zip
-ZIPFLAGS = -r
-COMPRESS = gzip --best
-SUFFIX = .gz
-SHAR = shar
-PREOP = $(NOECHO) $(NOOP)
-POSTOP = $(NOECHO) $(NOOP)
-TO_UNIX = $(NOECHO) $(NOOP)
-CI = ci -u
-RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
-DIST_CP = best
-DIST_DEFAULT = tardist
-DISTNAME = RT-Extension-FormTools
-DISTVNAME = RT-Extension-FormTools-undef
-
-
-# --- MakeMaker macro section:
-
-
-# --- MakeMaker depend section:
-
-
-# --- MakeMaker cflags section:
-
-
-# --- MakeMaker const_loadlibs section:
-
-
-# --- MakeMaker const_cccmd section:
-
-
-# --- MakeMaker post_constants section:
-
-
-# --- MakeMaker pasthru section:
-
-PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
-	LINKTYPE="$(LINKTYPE)"\
-	PREFIX="$(PREFIX)"
-
-
-# --- MakeMaker special_targets section:
-.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
-
-.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
-
-
-
-# --- MakeMaker c_o section:
-
-
-# --- MakeMaker xs_c section:
-
-
-# --- MakeMaker xs_o section:
-
-
-# --- MakeMaker top_targets section:
-all :: pure_all manifypods
-	$(NOECHO) $(NOOP)
-
-
-pure_all :: config pm_to_blib subdirs linkext
-	$(NOECHO) $(NOOP)
-
-subdirs :: $(MYEXTLIB)
-	$(NOECHO) $(NOOP)
-
-config :: $(FIRST_MAKEFILE) blibdirs
-	$(NOECHO) $(NOOP)
-
-help :
-	perldoc ExtUtils::MakeMaker
-
-
-# --- MakeMaker blibdirs section:
-blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
-	$(NOECHO) $(NOOP)
-
-# Backwards compat with 6.18 through 6.25
-blibdirs.ts : blibdirs
-	$(NOECHO) $(NOOP)
-
-$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_LIBDIR)
-	$(NOECHO) $(CHMOD) 755 $(INST_LIBDIR)
-	$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
-
-$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
-	$(NOECHO) $(CHMOD) 755 $(INST_ARCHLIB)
-	$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
-
-$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_AUTODIR)
-	$(NOECHO) $(CHMOD) 755 $(INST_AUTODIR)
-	$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
-
-$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
-	$(NOECHO) $(CHMOD) 755 $(INST_ARCHAUTODIR)
-	$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
-
-$(INST_BIN)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_BIN)
-	$(NOECHO) $(CHMOD) 755 $(INST_BIN)
-	$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
-
-$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_SCRIPT)
-	$(NOECHO) $(CHMOD) 755 $(INST_SCRIPT)
-	$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
-
-$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
-	$(NOECHO) $(CHMOD) 755 $(INST_MAN1DIR)
-	$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
-
-$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
-	$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
-	$(NOECHO) $(CHMOD) 755 $(INST_MAN3DIR)
-	$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
-
-
-
-# --- MakeMaker linkext section:
-
-linkext :: $(LINKTYPE)
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker dlsyms section:
-
-
-# --- MakeMaker dynamic section:
-
-dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker dynamic_bs section:
-
-BOOTSTRAP =
-
-
-# --- MakeMaker dynamic_lib section:
-
-
-# --- MakeMaker static section:
-
-## $(INST_PM) has been moved to the all: target.
-## It remains here for awhile to allow for old usage: "make static"
-static :: $(FIRST_MAKEFILE) $(INST_STATIC)
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker static_lib section:
-
-
-# --- MakeMaker manifypods section:
-
-POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
-POD2MAN = $(POD2MAN_EXE)
-
-
-manifypods : pure_all 
-	$(NOECHO) $(NOOP)
-
-
-
-
-# --- MakeMaker processPL section:
-
-
-# --- MakeMaker installbin section:
-
-
-# --- MakeMaker subdirs section:
-
-# none
-
-# --- MakeMaker clean_subdirs section:
-clean_subdirs :
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker clean section:
-
-# Delete temporary files but do not touch installed files. We don't delete
-# the Makefile here so a later make realclean still has a makefile to use.
-
-clean :: clean_subdirs
-	- $(RM_F) \
-	  *$(LIB_EXT) core \
-	  core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
-	  core.[0-9][0-9] $(BASEEXT).bso \
-	  pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
-	  $(BASEEXT).x $(BOOTSTRAP) \
-	  perl$(EXE_EXT) tmon.out \
-	  *$(OBJ_EXT) pm_to_blib \
-	  $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
-	  core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
-	  core.*perl.*.? $(MAKE_APERL_FILE) \
-	  perl $(BASEEXT).def \
-	  core.[0-9][0-9][0-9] mon.out \
-	  lib$(BASEEXT).def perlmain.c \
-	  perl.exe so_locations \
-	  $(BASEEXT).exp 
-	- $(RM_RF) \
-	  blib 
-	- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
-
-
-# --- MakeMaker realclean_subdirs section:
-realclean_subdirs :
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker realclean section:
-# Delete temporary files (via clean) and also delete dist files
-realclean purge ::  clean realclean_subdirs
-	- $(RM_F) \
-	  $(MAKEFILE_OLD) $(FIRST_MAKEFILE) 
-	- $(RM_RF) \
-	  $(DISTVNAME) 
-
-
-# --- MakeMaker metafile section:
-metafile:
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker signature section:
-signature :
-	cpansign -s
-
-
-# --- MakeMaker dist_basics section:
-distclean :: realclean distcheck
-	$(NOECHO) $(NOOP)
-
-distcheck :
-	$(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
-
-skipcheck :
-	$(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
-
-manifest :
-	$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
-
-veryclean : realclean
-	$(RM_F) *~ *.orig */*~ */*.orig
-
-
-
-# --- MakeMaker dist_core section:
-
-dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
-	$(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
-	  -e '    if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
-
-tardist : $(DISTVNAME).tar$(SUFFIX)
-	$(NOECHO) $(NOOP)
-
-uutardist : $(DISTVNAME).tar$(SUFFIX)
-	uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
-
-$(DISTVNAME).tar$(SUFFIX) : distdir
-	$(PREOP)
-	$(TO_UNIX)
-	$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
-	$(RM_RF) $(DISTVNAME)
-	$(COMPRESS) $(DISTVNAME).tar
-	$(POSTOP)
-
-zipdist : $(DISTVNAME).zip
-	$(NOECHO) $(NOOP)
-
-$(DISTVNAME).zip : distdir
-	$(PREOP)
-	$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
-	$(RM_RF) $(DISTVNAME)
-	$(POSTOP)
-
-shdist : distdir
-	$(PREOP)
-	$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
-	$(RM_RF) $(DISTVNAME)
-	$(POSTOP)
-
-
-# --- MakeMaker distdir section:
-create_distdir :
-	$(RM_RF) $(DISTVNAME)
-	$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
-		-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
-
-distdir : create_distdir  
-	$(NOECHO) $(NOOP)
-
-
-
-# --- MakeMaker dist_test section:
-disttest : distdir
-	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL 
-	cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
-	cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
-
-
-
-# --- MakeMaker dist_ci section:
-
-ci :
-	$(PERLRUN) "-MExtUtils::Manifest=maniread" \
-	  -e "@all = keys %{ maniread() };" \
-	  -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
-	  -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
-
-
-# --- MakeMaker distmeta section:
-distmeta : create_distdir metafile
-	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
-	  -e '    or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
-
-
-
-# --- MakeMaker distsignature section:
-distsignature : create_distdir
-	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
-	  -e '    or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
-	$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
-	cd $(DISTVNAME) && cpansign -s
-
-
-
-# --- MakeMaker install section:
-
-install :: all pure_install doc_install
-	$(NOECHO) $(NOOP)
-
-install_perl :: all pure_perl_install doc_perl_install
-	$(NOECHO) $(NOOP)
-
-install_site :: all pure_site_install doc_site_install
-	$(NOECHO) $(NOOP)
-
-install_vendor :: all pure_vendor_install doc_vendor_install
-	$(NOECHO) $(NOOP)
-
-pure_install :: pure_$(INSTALLDIRS)_install
-	$(NOECHO) $(NOOP)
-
-doc_install :: doc_$(INSTALLDIRS)_install
-	$(NOECHO) $(NOOP)
-
-pure__install : pure_site_install
-	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
-doc__install : doc_site_install
-	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
-pure_perl_install ::
-	$(NOECHO) $(MOD_INSTALL) \
-		read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
-		write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
-		$(INST_LIB) $(DESTINSTALLPRIVLIB) \
-		$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
-		$(INST_BIN) $(DESTINSTALLBIN) \
-		$(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
-		$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
-		$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
-	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
-		$(SITEARCHEXP)/auto/$(FULLEXT)
-
-
-pure_site_install ::
-	$(NOECHO) $(MOD_INSTALL) \
-		read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
-		write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
-		$(INST_LIB) $(DESTINSTALLSITELIB) \
-		$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
-		$(INST_BIN) $(DESTINSTALLSITEBIN) \
-		$(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
-		$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
-		$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
-	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
-		$(PERL_ARCHLIB)/auto/$(FULLEXT)
-
-pure_vendor_install ::
-	$(NOECHO) $(MOD_INSTALL) \
-		read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \
-		write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \
-		$(INST_LIB) $(DESTINSTALLVENDORLIB) \
-		$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
-		$(INST_BIN) $(DESTINSTALLVENDORBIN) \
-		$(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
-		$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
-		$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
-
-doc_perl_install ::
-	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
-	-$(NOECHO) $(DOC_INSTALL) \
-		"Module" "$(NAME)" \
-		"installed into" "$(INSTALLPRIVLIB)" \
-		LINKTYPE "$(LINKTYPE)" \
-		VERSION "$(VERSION)" \
-		EXE_FILES "$(EXE_FILES)" \
-		>> $(DESTINSTALLARCHLIB)/perllocal.pod
-
-doc_site_install ::
-	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
-	-$(NOECHO) $(DOC_INSTALL) \
-		"Module" "$(NAME)" \
-		"installed into" "$(INSTALLSITELIB)" \
-		LINKTYPE "$(LINKTYPE)" \
-		VERSION "$(VERSION)" \
-		EXE_FILES "$(EXE_FILES)" \
-		>> $(DESTINSTALLARCHLIB)/perllocal.pod
-
-doc_vendor_install ::
-	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
-	-$(NOECHO) $(DOC_INSTALL) \
-		"Module" "$(NAME)" \
-		"installed into" "$(INSTALLVENDORLIB)" \
-		LINKTYPE "$(LINKTYPE)" \
-		VERSION "$(VERSION)" \
-		EXE_FILES "$(EXE_FILES)" \
-		>> $(DESTINSTALLARCHLIB)/perllocal.pod
-
-
-uninstall :: uninstall_from_$(INSTALLDIRS)dirs
-	$(NOECHO) $(NOOP)
-
-uninstall_from_perldirs ::
-	$(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist
-
-uninstall_from_sitedirs ::
-	$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
-
-uninstall_from_vendordirs ::
-	$(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist
-
-
-# --- MakeMaker force section:
-# Phony target to force checking subdirectories.
-FORCE:
-	$(NOECHO) $(NOOP)
-
-
-# --- MakeMaker perldepend section:
-
-
-# --- MakeMaker makefile section:
-# We take a very conservative approach here, but it's worth it.
-# We move Makefile to Makefile.old here to avoid gnu make looping.
-$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
-	$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
-	$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
-	-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
-	-$(NOECHO) $(MV)   $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
-	- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
-	$(PERLRUN) Makefile.PL 
-	$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
-	$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command.  <=="
-	false
-
-
-
-# --- MakeMaker staticmake section:
-
-# --- MakeMaker makeaperl section ---
-MAP_TARGET    = perl
-FULLPERL      = /opt/local/bin/perl
-
-$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
-	$(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
-
-$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
-	$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
-	$(NOECHO) $(PERLRUNINST) \
-		Makefile.PL DIR= \
-		MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
-		MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
-
-
-# --- MakeMaker test section:
-
-TEST_VERBOSE=0
-TEST_TYPE=test_$(LINKTYPE)
-TEST_FILE = test.pl
-TEST_FILES = 
-TESTDB_SW = -d
-
-testdb :: testdb_$(LINKTYPE)
-
-test :: $(TEST_TYPE)
-	$(NOECHO) $(ECHO) 'No tests defined for $(NAME) extension.'
-
-test_dynamic :: pure_all
-
-testdb_dynamic :: pure_all
-	PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-Iinc" "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
-
-test_ : test_dynamic
-
-test_static :: test_dynamic
-testdb_static :: testdb_dynamic
-
-
-# --- MakeMaker ppd section:
-# Creates a PPD (Perl Package Description) for a binary distribution.
-ppd:
-	$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="undef,0,0,0">' > $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '    <TITLE>$(DISTNAME)</TITLE>' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '    <ABSTRACT>RT Extension-FormTools Extension</ABSTRACT>' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '    <AUTHOR></AUTHOR>' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '    <IMPLEMENTATION>' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '        <OS NAME="$(OSNAME)" />' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '        <ARCHITECTURE NAME="darwin-2level-5.8" />' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '        <CODEBASE HREF="" />' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '    </IMPLEMENTATION>' >> $(DISTNAME).ppd
-	$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
-
-
-# --- MakeMaker pm_to_blib section:
-
-pm_to_blib : $(TO_INST_PM)
-	$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')' -- \
-	  lib/RT/FormTools/Flow.pm blib/lib/RT/FormTools/Flow.pm \
-	  lib/RT/Extension/FormTools.pm blib/lib/RT/Extension/FormTools.pm 
-	$(NOECHO) $(TOUCH) pm_to_blib
-
-
-# --- MakeMaker selfdocument section:
-
-
-# --- MakeMaker postamble section:
-
-
-# End.
-# Postamble by Module::Install 0.67
-install ::
-	$(NOECHO) $(PERL) -MExtUtils::Install -e "install({q(html), q(/opt/rt3/share/html), q(etc), q(/opt/rt3/local/etc/Extension-FormTools)})"
-

commit a6aaca060d840b4b2b99c157598d1ce01774e19a
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jan 9 15:04:46 2008 +0000

    * cleanup

diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index ae565f4..c725f5c 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -1,16 +1,19 @@
 #line 1
 package Module::Install::RTx;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
+use Module::Install::Base;
+ at ISA = qw(Module::Install::Base);
 
-$Module::Install::RTx::VERSION = '0.11';
+$Module::Install::RTx::VERSION = '0.20';
 
 use strict;
 use FindBin;
-use File::Glob ();
+use File::Glob     ();
 use File::Basename ();
 
 sub RTx {
-    my ($self, $name) = @_;
+    my ( $self, $name ) = @_;
+
+    my $original_name = $name;
     my $RTx = 'RTx';
     $RTx = $1 if $name =~ s/^(\w+)-//;
     my $fname = $name;
@@ -20,41 +23,44 @@ sub RTx {
         unless $self->name;
     $self->abstract("RT $name Extension")
         unless $self->abstract;
-    $self->version_from (-e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm")
+    $self->version_from( -e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm" )
         unless $self->version;
 
     my @prefixes = (qw(/opt /usr/local /home /usr /sw ));
-    my $prefix = $ENV{PREFIX};
-    @ARGV = grep { /PREFIX=(.*)/ ? (($prefix = $1), 0) : 1 } @ARGV;
+    my $prefix   = $ENV{PREFIX};
+    @ARGV = grep { /PREFIX=(.*)/ ? ( ( $prefix = $1 ), 0 ) : 1 } @ARGV;
 
     if ($prefix) {
         $RT::LocalPath = $prefix;
         $INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm";
-    }
-    else {
+    } else {
         local @INC = (
             @INC,
-            $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : (),
-            map {( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" )} grep $_, @prefixes
+            $ENV{RTHOME} ? ( $ENV{RTHOME}, "$ENV{RTHOME}/lib" ) : (),
+            map { ( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) } grep $_,
+            @prefixes
         );
         until ( eval { require RT; $RT::LocalPath } ) {
-            warn "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @INC\n";
+            warn
+                "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @INC\n";
             $_ = $self->prompt("Path to your RT.pm:") or exit;
-            push @INC, $_, "$_/rt3/lib", "$_/lib/rt3";
+            push @INC, $_, "$_/rt3/lib", "$_/lib/rt3", "$_/lib";
         }
     }
 
-    my $lib_path = File::Basename::dirname($INC{'RT.pm'});
-    print "Using RT configurations from $INC{'RT.pm'}:\n";
+    my $lib_path = File::Basename::dirname( $INC{'RT.pm'} );
+    print "Using RT configuration from $INC{'RT.pm'}:\n";
+    unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
 
-    $RT::LocalVarPath	||= $RT::VarPath;
-    $RT::LocalPoPath	||= $RT::LocalLexiconPath;
-    $RT::LocalHtmlPath	||= $RT::MasonComponentRoot;
+    $RT::LocalVarPath  ||= $RT::VarPath;
+    $RT::LocalPoPath   ||= $RT::LocalLexiconPath;
+    $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
 
     my %path;
     my $with_subdirs = $ENV{WITH_SUBDIRS};
-    @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? (($with_subdirs = $1), 0) : 1 } @ARGV;
-    my %subdirs = map { $_ => 1 } split(/\s*,\s*/, $with_subdirs);
+    @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
+        @ARGV;
+    my %subdirs = map { $_ => 1 } split( /\s*,\s*/, $with_subdirs );
 
     foreach (qw(bin etc html po sbin var)) {
         next unless -d "$FindBin::Bin/$_";
@@ -67,12 +73,25 @@ sub RTx {
     }
 
     $path{$_} .= "/$name" for grep $path{$_}, qw(etc po var);
-    my $args = join(', ', map "q($_)", %path);
     $path{lib} = "$RT::LocalPath/lib" unless %subdirs and !$subdirs{'lib'};
+
+    # If we're running on RT 3.8 with plugin support, we really wany
+    # to install libs, mason templates and po files into plugin specific
+    # directories
+    if ($RT::LocalPluginPath) {
+        foreach my $path (qw(lib po html etc bin sbin)) {
+            next unless -d "$FindBin::Bin/$path";
+            next if %subdirs and !$subdirs{$path};
+            $path{$path} = $RT::LocalPluginPath . "/$original_name/$path";
+        }
+    }
+
+    my $args = join( ', ', map "q($_)", %path );
     print "./$_\t=> $path{$_}\n" for sort keys %path;
 
-    if (my @dirs = map { (-D => $_) } grep $path{$_}, qw(bin html sbin)) {
-        my @po = map { (-o => $_) } grep -f, File::Glob::bsd_glob("po/*.po");
+    if ( my @dirs = map { ( -D => $_ ) } grep $path{$_}, qw(bin html sbin) ) {
+        my @po = map { ( -o => $_ ) } grep -f,
+            File::Glob::bsd_glob("po/*.po");
         $self->postamble(<< ".") if @po;
 lexicons ::
 \t\$(NOECHO) \$(PERL) -MLocale::Maketext::Extract::Run=xgettext -e \"xgettext(qw(@dirs @po))\"
@@ -84,15 +103,16 @@ install ::
 \t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
 .
 
-    if ($path{var} and -d $RT::MasonDataDir) {
-        my ($uid, $gid) = (stat($RT::MasonDataDir))[4, 5];
+    if ( $path{var} and -d $RT::MasonDataDir ) {
+        my ( $uid, $gid ) = ( stat($RT::MasonDataDir) )[ 4, 5 ];
         $postamble .= << ".";
 \t\$(NOECHO) chown -R $uid:$gid $path{var}
 .
     }
 
     my %has_etc;
-    if (File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*")) {
+    if ( File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*") ) {
+
         # got schema, load factory module
         $has_etc{schema}++;
         $self->load('RTxFactory');
@@ -105,23 +125,22 @@ dropdb ::
 
 .
     }
-    if (File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*")) {
+    if ( File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*") ) {
         $has_etc{acl}++;
     }
-    if (-e 'etc/initialdata') {
-        $has_etc{initialdata}++;
-    }
+    if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
 
     $self->postamble("$postamble\n");
-    if (%subdirs and !$subdirs{'lib'}) {
-        $self->makemaker_args(
-            PM => { "" => "" },
-        )
-    }
-    else {
+    if ( %subdirs and !$subdirs{'lib'} ) {
+        $self->makemaker_args( PM => { "" => "" }, );
+    } else {
         $self->makemaker_args( INSTALLSITELIB => "$RT::LocalPath/lib" );
     }
 
+        $self->makemaker_args( INSTALLSITEMAN1DIR => "$RT::LocalPath/man/man1" );
+        $self->makemaker_args( INSTALLSITEMAN3DIR => "$RT::LocalPath/man/man3" );
+        $self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
+        $self->makemaker_args( INSTALLARCHLIB => "$RT::LocalPath/lib" );
     if (%has_etc) {
         $self->load('RTxInitDB');
         print "For first-time installation, type 'make initdb'.\n";
@@ -141,7 +160,7 @@ dropdb ::
 }
 
 sub RTxInit {
-    unshift @INC, substr(delete($INC{'RT.pm'}), 0, -5) if $INC{'RT.pm'};
+    unshift @INC, substr( delete( $INC{'RT.pm'} ), 0, -5 ) if $INC{'RT.pm'};
     require RT;
     RT::LoadConfig();
     RT::ConnectToDatabase();
@@ -153,6 +172,6 @@ sub RTxInit {
 
 __END__
 
-#line 220
+#line 239
 
-#line 241
+#line 260

commit 2fce5647a76b26d7aaa58ee05d45b3cb249497a3
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jan 9 15:05:24 2008 +0000

    * add a render_as date option

diff --git a/html/FormTools/Field b/html/FormTools/Field
index d533aed..14e99cf 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -77,6 +77,8 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
 % }
             ><% $value->Name%><br/>
 % }
+% } elsif ($render_as =~  /^date/i)  {
+<& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0 &>
 % } else {
 % die "'$render_as' isn't a valid rendering option for field '$name'";
 %}

commit 75fbdabc5555d34ba08534dd487477e02573a23c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jan 9 15:05:33 2008 +0000

    * default checkboxes to a horizontal display, like radio buttons
      allowing the vertical flag like radio buttons

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 14e99cf..2415e21 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -75,7 +75,11 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
 %  if ($default) {
             <% ($default eq $value->Name) ? 'CHECKED' : '' %>
 % }
-            ><% $value->Name%><br/>
+            ><% $value->Name%>
+%        if ($render_as =~ /vertical/) { 
+            <br/>
+%        }
+
 % }
 % } elsif ($render_as =~  /^date/i)  {
 <& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0 &>

commit 0c1216580cb8b255f4fc48179316aaa04a876891
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jan 9 15:06:08 2008 +0000

commit 4b7727c0be8b1054703a6b193ca975dd6e39f940
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Sat Apr 5 07:46:29 2008 +0000

    Add include_header (default true) to Form in case you don't want the header

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 5cffb4b..d2cb292 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -1,5 +1,6 @@
 <%args>
 $next
+$include_header => 1
 </%args>
 <%init>
 my $content = $m->content;
@@ -22,9 +23,10 @@ foreach my $key (keys %request_args) {
 }
 
 </%init>
+% if ($include_header) {
 <& /Elements/Header, Title => $m->notes('page_title') &>
-
 <& /Elements/PageLayout, title => $m->notes('page_title') &>
+% }
 
 <form method="POST" action="<%$next%>">
 <%$content|n%>

commit 463290aef6b6d3ca03fc35db35cebb683158b2ac
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jun 4 21:49:16 2008 +0000

    * handle attachments in posts by setting the form to the right type

diff --git a/html/FormTools/Form b/html/FormTools/Form
index d2cb292..cf54a0d 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -28,10 +28,11 @@ foreach my $key (keys %request_args) {
 <& /Elements/PageLayout, title => $m->notes('page_title') &>
 % }
 
-<form method="POST" action="<%$next%>">
+<form method="POST" action="<%$next%>" enctype="multipart/form-data">
 <%$content|n%>
 
 % foreach my $key (keys %request_args) {
+% next if (ref $request_args{$key} ne 'ARRAY');
 % foreach my $val ( ref ($request_args{$key}) ? @{$request_args{$key}} : ($request_args{$key})) {
 
 <input type="hidden" name="<%$key%>" value="<%$val%>" />

commit 0c8545e4dffa61a2473ff85cbd53c05279533461
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jun 4 21:49:24 2008 +0000

    * allows you to reload a form if there were errors and
      we'll look in the request args and try to fill
      fields back in

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 2415e21..07b07d2 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -30,6 +30,17 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
     $field_label ||= $cf->Name;
 }
 
+unless ( $default ) {
+    my $request_args = $m->request_args();
+    if ( $field_type eq 'core' && $request_args->{$name} ) {
+        $default = $request_args->{$name};
+    } elsif ( $cf->Id ) {
+        $default = ($request_args->{$NamePrefix.$cf->Id."-Value"} || 
+                    $request_args->{$NamePrefix.$cf->Id."-Values"} );
+    }
+    $RT::Logger->error("default $default for name $name") if $default;
+}
+
 </%init>
 <table style="display: inline; "><tr><th valign="top"><label><%$field_label%></label></th><td style="display:block;">
 % if ($field_type eq 'core') {
@@ -41,7 +52,7 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
     <& /Elements/EditCustomField, Object => $queue, CustomField => $cf, NamePrefix => $NamePrefix, 
             ($cf->Type =~ /text/i) ? (Rows => 6, Cols => $cols ||60) : (),
             ($cf->Type =~ /freeform/i) ? (Rows => 6, Cols => $cols ||30) : (),
-            
+            ($default ? (Default => $default) : ())
             
             &>
 % } elsif ($render_as =~ /^radio/)  {
@@ -58,7 +69,11 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
 % while ($CFVs and my $value = $CFVs->Next ) {
         <input type="radio" name="<%$id%>-Values"  value="<%$value->Name%>" 
 %  if ($default) {
+%       if (ref $default) {
+            <% (grep { $_ eq $value->Name} @$default) ? 'CHECKED' : '' %>
+%       } else {
             <% ($default eq $value->Name) ? 'CHECKED' : '' %>
+%       }
 % }
             ><% $value->Name%> 
 
@@ -73,7 +88,11 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
 % while ($CFVs and my $value = $CFVs->Next ) {
         <input type="checkbox" name="<%$id%>-Values"  value="<%$value->Name%>" 
 %  if ($default) {
+%       if (ref $default) {
+            <% (grep { $_ eq $value->Name} @$default) ? 'CHECKED' : '' %>
+%       } else {
             <% ($default eq $value->Name) ? 'CHECKED' : '' %>
+%       }
 % }
             ><% $value->Name%>
 %        if ($render_as =~ /vertical/) { 

commit a23920253596de4e572b4f40f4a5d085f9234ea5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Jun 4 21:53:37 2008 +0000

    * fix accidental commits which wants to skip non-array refs, but still
      let scalars through

diff --git a/html/FormTools/Form b/html/FormTools/Form
index cf54a0d..5d5b08b 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -32,7 +32,7 @@ foreach my $key (keys %request_args) {
 <%$content|n%>
 
 % foreach my $key (keys %request_args) {
-% next if (ref $request_args{$key} ne 'ARRAY');
+% next if (ref $request_args{$key} && ref $request_args{$key} ne 'ARRAY');
 % foreach my $val ( ref ($request_args{$key}) ? @{$request_args{$key}} : ($request_args{$key})) {
 
 <input type="hidden" name="<%$key%>" value="<%$val%>" />

commit dcf556bcbfd98ac003124ead6b87d584a116136c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jun 5 19:52:49 2008 +0000

    * bump up MI

diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 9d13686..e6758c9 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -17,20 +17,26 @@ package Module::Install;
 #     3. The ./inc/ version of Module::Install loads
 # }
 
-use 5.004;
+BEGIN {
+	require 5.004;
+}
 use strict 'vars';
 
 use vars qw{$VERSION};
 BEGIN {
-    # All Module::Install core packages now require synchronised versions.
-    # This will be used to ensure we don't accidentally load old or
-    # different versions of modules.
-    # This is not enforced yet, but will be some time in the next few
-    # releases once we can make sure it won't clash with custom
-    # Module::Install extensions.
-    $VERSION = '0.67';
+	# All Module::Install core packages now require synchronised versions.
+	# This will be used to ensure we don't accidentally load old or
+	# different versions of modules.
+	# This is not enforced yet, but will be some time in the next few
+	# releases once we can make sure it won't clash with custom
+	# Module::Install extensions.
+	$VERSION = '0.70';
 }
 
+
+
+
+
 # Whether or not inc::Module::Install is actually loaded, the
 # $INC{inc/Module/Install.pm} is what will still get set as long as
 # the caller loaded module this in the documented manner.
@@ -38,26 +44,29 @@ BEGIN {
 # they may not have a MI version that works with the Makefile.PL. This would
 # result in false errors or unexpected behaviour. And we don't want that.
 my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
-unless ( $INC{$file} ) {
-    die <<"END_DIE";
+unless ( $INC{$file} ) { die <<"END_DIE" }
+
 Please invoke ${\__PACKAGE__} with:
 
-    use inc::${\__PACKAGE__};
+	use inc::${\__PACKAGE__};
 
 not:
 
-    use ${\__PACKAGE__};
+	use ${\__PACKAGE__};
 
 END_DIE
-}
+
+
+
+
 
 # If the script that is loading Module::Install is from the future,
 # then make will detect this and cause it to re-run over and over
 # again. This is bad. Rather than taking action to touch it (which
 # is unreliable on some platforms and requires write permissions)
 # for now we should catch this and refuse to run.
-if ( -f $0 and (stat($0))[9] > time ) {
-	die << "END_DIE";
+if ( -f $0 and (stat($0))[9] > time ) { die <<"END_DIE" }
+
 Your installer $0 has a modification time in the future.
 
 This is known to create infinite loops in make.
@@ -65,7 +74,26 @@ This is known to create infinite loops in make.
 Please correct this, then run $0 again.
 
 END_DIE
-}
+
+
+
+
+
+# Build.PL was formerly supported, but no longer is due to excessive
+# difficulty in implementing every single feature twice.
+if ( $0 =~ /Build.PL$/i or -f 'Build.PL' ) { die <<"END_DIE" }
+
+Module::Install no longer supports Build.PL.
+
+It was impossible to maintain duel backends, and has been deprecated.
+
+Please remove all Build.PL files and only use the Makefile.PL installer.
+
+END_DIE
+
+
+
+
 
 use Cwd        ();
 use File::Find ();
@@ -76,104 +104,106 @@ use FindBin;
 @inc::Module::Install::ISA     = __PACKAGE__;
 
 sub autoload {
-    my $self = shift;
-    my $who  = $self->_caller;
-    my $cwd  = Cwd::cwd();
-    my $sym  = "${who}::AUTOLOAD";
-    $sym->{$cwd} = sub {
-        my $pwd = Cwd::cwd();
-        if ( my $code = $sym->{$pwd} ) {
-            # delegate back to parent dirs
-            goto &$code unless $cwd eq $pwd;
-        }
-        $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-        unshift @_, ($self, $1);
-        goto &{$self->can('call')} unless uc($1) eq $1;
-    };
+	my $self = shift;
+	my $who  = $self->_caller;
+	my $cwd  = Cwd::cwd();
+	my $sym  = "${who}::AUTOLOAD";
+	$sym->{$cwd} = sub {
+		my $pwd = Cwd::cwd();
+		if ( my $code = $sym->{$pwd} ) {
+			# delegate back to parent dirs
+			goto &$code unless $cwd eq $pwd;
+		}
+		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
+		unshift @_, ( $self, $1 );
+		goto &{$self->can('call')} unless uc($1) eq $1;
+	};
 }
 
 sub import {
-    my $class = shift;
-    my $self  = $class->new(@_);
-    my $who   = $self->_caller;
-
-    unless ( -f $self->{file} ) {
-        require "$self->{path}/$self->{dispatch}.pm";
-        File::Path::mkpath("$self->{prefix}/$self->{author}");
-        $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
-        $self->{admin}->init;
-        @_ = ($class, _self => $self);
-        goto &{"$self->{name}::import"};
-    }
-
-    *{"${who}::AUTOLOAD"} = $self->autoload;
-    $self->preload;
-
-    # Unregister loader and worker packages so subdirs can use them again
-    delete $INC{"$self->{file}"};
-    delete $INC{"$self->{path}.pm"};
+	my $class = shift;
+	my $self  = $class->new(@_);
+	my $who   = $self->_caller;
+
+	unless ( -f $self->{file} ) {
+		require "$self->{path}/$self->{dispatch}.pm";
+		File::Path::mkpath("$self->{prefix}/$self->{author}");
+		$self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
+		$self->{admin}->init;
+		@_ = ($class, _self => $self);
+		goto &{"$self->{name}::import"};
+	}
+
+	*{"${who}::AUTOLOAD"} = $self->autoload;
+	$self->preload;
+
+	# Unregister loader and worker packages so subdirs can use them again
+	delete $INC{"$self->{file}"};
+	delete $INC{"$self->{path}.pm"};
+
+	return 1;
 }
 
 sub preload {
-    my ($self) = @_;
-
-    unless ( $self->{extensions} ) {
-        $self->load_extensions(
-            "$self->{prefix}/$self->{path}", $self
-        );
-    }
-
-    my @exts = @{$self->{extensions}};
-    unless ( @exts ) {
-        my $admin = $self->{admin};
-        @exts = $admin->load_all_extensions;
-    }
-
-    my %seen;
-    foreach my $obj ( @exts ) {
-        while (my ($method, $glob) = each %{ref($obj) . '::'}) {
-            next unless $obj->can($method);
-            next if $method =~ /^_/;
-            next if $method eq uc($method);
-            $seen{$method}++;
-        }
-    }
-
-    my $who = $self->_caller;
-    foreach my $name ( sort keys %seen ) {
-        *{"${who}::$name"} = sub {
-            ${"${who}::AUTOLOAD"} = "${who}::$name";
-            goto &{"${who}::AUTOLOAD"};
-        };
-    }
+	my ($self) = @_;
+
+	unless ( $self->{extensions} ) {
+		$self->load_extensions(
+			"$self->{prefix}/$self->{path}", $self
+		);
+	}
+
+	my @exts = @{$self->{extensions}};
+	unless ( @exts ) {
+		my $admin = $self->{admin};
+		@exts = $admin->load_all_extensions;
+	}
+
+	my %seen;
+	foreach my $obj ( @exts ) {
+		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
+			next unless $obj->can($method);
+			next if $method =~ /^_/;
+			next if $method eq uc($method);
+			$seen{$method}++;
+		}
+	}
+
+	my $who = $self->_caller;
+	foreach my $name ( sort keys %seen ) {
+		*{"${who}::$name"} = sub {
+			${"${who}::AUTOLOAD"} = "${who}::$name";
+			goto &{"${who}::AUTOLOAD"};
+		};
+	}
 }
 
 sub new {
-    my ($class, %args) = @_;
-
-    # ignore the prefix on extension modules built from top level.
-    my $base_path = Cwd::abs_path($FindBin::Bin);
-    unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
-        delete $args{prefix};
-    }
-
-    return $args{_self} if $args{_self};
-
-    $args{dispatch} ||= 'Admin';
-    $args{prefix}   ||= 'inc';
-    $args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
-    $args{bundle}   ||= 'inc/BUNDLES';
-    $args{base}     ||= $base_path;
-    $class =~ s/^\Q$args{prefix}\E:://;
-    $args{name}     ||= $class;
-    $args{version}  ||= $class->VERSION;
-    unless ( $args{path} ) {
-        $args{path}  = $args{name};
-        $args{path}  =~ s!::!/!g;
-    }
-    $args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
-
-    bless( \%args, $class );
+	my ($class, %args) = @_;
+
+	# ignore the prefix on extension modules built from top level.
+	my $base_path = Cwd::abs_path($FindBin::Bin);
+	unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
+		delete $args{prefix};
+	}
+
+	return $args{_self} if $args{_self};
+
+	$args{dispatch} ||= 'Admin';
+	$args{prefix}   ||= 'inc';
+	$args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
+	$args{bundle}   ||= 'inc/BUNDLES';
+	$args{base}     ||= $base_path;
+	$class =~ s/^\Q$args{prefix}\E:://;
+	$args{name}     ||= $class;
+	$args{version}  ||= $class->VERSION;
+	unless ( $args{path} ) {
+		$args{path}  = $args{name};
+		$args{path}  =~ s!::!/!g;
+	}
+	$args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
+
+	bless( \%args, $class );
 }
 
 sub call {
@@ -184,98 +214,100 @@ sub call {
 }
 
 sub load {
-    my ($self, $method) = @_;
+	my ($self, $method) = @_;
 
-    $self->load_extensions(
-        "$self->{prefix}/$self->{path}", $self
-    ) unless $self->{extensions};
+	$self->load_extensions(
+		"$self->{prefix}/$self->{path}", $self
+	) unless $self->{extensions};
 
-    foreach my $obj (@{$self->{extensions}}) {
-        return $obj if $obj->can($method);
-    }
+	foreach my $obj (@{$self->{extensions}}) {
+		return $obj if $obj->can($method);
+	}
 
-    my $admin = $self->{admin} or die <<"END_DIE";
+	my $admin = $self->{admin} or die <<"END_DIE";
 The '$method' method does not exist in the '$self->{prefix}' path!
 Please remove the '$self->{prefix}' directory and run $0 again to load it.
 END_DIE
 
-    my $obj = $admin->load($method, 1);
-    push @{$self->{extensions}}, $obj;
+	my $obj = $admin->load($method, 1);
+	push @{$self->{extensions}}, $obj;
 
-    $obj;
+	$obj;
 }
 
 sub load_extensions {
-    my ($self, $path, $top) = @_;
-
-    unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
-        unshift @INC, $self->{prefix};
-    }
-
-    foreach my $rv ( $self->find_extensions($path) ) {
-        my ($file, $pkg) = @{$rv};
-        next if $self->{pathnames}{$pkg};
-
-        local $@;
-        my $new = eval { require $file; $pkg->can('new') };
-        unless ( $new ) {
-            warn $@ if $@;
-            next;
-        }
-        $self->{pathnames}{$pkg} = delete $INC{$file};
-        push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
-    }
-
-    $self->{extensions} ||= [];
+	my ($self, $path, $top) = @_;
+
+	unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+		unshift @INC, $self->{prefix};
+	}
+
+	foreach my $rv ( $self->find_extensions($path) ) {
+		my ($file, $pkg) = @{$rv};
+		next if $self->{pathnames}{$pkg};
+
+		local $@;
+		my $new = eval { require $file; $pkg->can('new') };
+		unless ( $new ) {
+			warn $@ if $@;
+			next;
+		}
+		$self->{pathnames}{$pkg} = delete $INC{$file};
+		push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
+	}
+
+	$self->{extensions} ||= [];
 }
 
 sub find_extensions {
-    my ($self, $path) = @_;
-
-    my @found;
-    File::Find::find( sub {
-        my $file = $File::Find::name;
-        return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
-        my $subpath = $1;
-        return if lc($subpath) eq lc($self->{dispatch});
-
-        $file = "$self->{path}/$subpath.pm";
-        my $pkg = "$self->{name}::$subpath";
-        $pkg =~ s!/!::!g;
-
-        # If we have a mixed-case package name, assume case has been preserved
-        # correctly.  Otherwise, root through the file to locate the case-preserved
-        # version of the package name.
-        if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
-            open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
-            my $in_pod = 0;
-            while ( <PKGFILE> ) {
-                $in_pod = 1 if /^=\w/;
-                $in_pod = 0 if /^=cut/;
-                next if ($in_pod || /^=cut/);  # skip pod text
-                next if /^\s*#/;               # and comments
-                if ( m/^\s*package\s+($pkg)\s*;/i ) {
-                    $pkg = $1;
-                    last;
-                }
-            }
-            close PKGFILE;
-        }
-
-        push @found, [ $file, $pkg ];
-    }, $path ) if -d $path;
-
-    @found;
+	my ($self, $path) = @_;
+
+	my @found;
+	File::Find::find( sub {
+		my $file = $File::Find::name;
+		return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
+		my $subpath = $1;
+		return if lc($subpath) eq lc($self->{dispatch});
+
+		$file = "$self->{path}/$subpath.pm";
+		my $pkg = "$self->{name}::$subpath";
+		$pkg =~ s!/!::!g;
+
+		# If we have a mixed-case package name, assume case has been preserved
+		# correctly.  Otherwise, root through the file to locate the case-preserved
+		# version of the package name.
+		if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+			open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
+			my $in_pod = 0;
+			while ( <PKGFILE> ) {
+				$in_pod = 1 if /^=\w/;
+				$in_pod = 0 if /^=cut/;
+				next if ($in_pod || /^=cut/);  # skip pod text
+				next if /^\s*#/;               # and comments
+				if ( m/^\s*package\s+($pkg)\s*;/i ) {
+					$pkg = $1;
+					last;
+				}
+			}
+			close PKGFILE;
+		}
+
+		push @found, [ $file, $pkg ];
+	}, $path ) if -d $path;
+
+	@found;
 }
 
 sub _caller {
-    my $depth = 0;
-    my $call  = caller($depth);
-    while ( $call eq __PACKAGE__ ) {
-        $depth++;
-        $call = caller($depth);
-    }
-    return $call;
+	my $depth = 0;
+	my $call  = caller($depth);
+	while ( $call eq __PACKAGE__ ) {
+		$depth++;
+		$call = caller($depth);
+	}
+	return $call;
 }
 
 1;
+
+# Copyright 2008 Adam Kennedy.
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 81fbcb6..5e24ae1 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.67';
+$VERSION = '0.70';
 
 # Suspend handler for "redefined" warnings
 BEGIN {
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 5d1eab8..9ce21a4 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -11,7 +11,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.70';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index e884477..2b8f6e8 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.70';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index fbc5cb2..27bbace 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -7,7 +7,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.70';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -37,7 +37,7 @@ sub prompt {
 sub makemaker_args {
 	my $self = shift;
 	my $args = ($self->{makemaker_args} ||= {});
-	%$args = ( %$args, @_ ) if @_;
+	  %$args = ( %$args, @_ ) if @_;
 	$args;
 }
 
@@ -104,8 +104,8 @@ sub tests_recursive {
 	unless ( -d $dir ) {
 		die "tests_recursive dir '$dir' does not exist";
 	}
-	require File::Find;
 	%test_dir = ();
+	require File::Find;
 	File::Find::find( \&_wanted_t, $dir );
 	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
 }
@@ -114,6 +114,11 @@ sub write {
 	my $self = shift;
 	die "&Makefile->write() takes no arguments\n" if @_;
 
+	# Make sure we have a new enough
+	require ExtUtils::MakeMaker;
+	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION );
+
+	# Generate the 
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
 	$args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
@@ -142,9 +147,12 @@ sub write {
 		map { @$_ }
 		map { @$_ }
 		grep $_,
-		($self->build_requires, $self->requires)
+		($self->configure_requires, $self->build_requires, $self->requires)
 	);
 
+	# Remove any reference to perl, PREREQ_PM doesn't support it
+	delete $args->{PREREQ_PM}->{perl};
+
 	# merge both kinds of requires into prereq_pm
 	my $subdirs = ($args->{DIR} ||= []);
 	if ($self->bundles) {
@@ -205,7 +213,7 @@ sub fix_up_makefile {
 	#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
 
 	# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
-	$makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+	$makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g;
 
 	# XXX - This is currently unused; not sure if it breaks other MM-users
 	# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
@@ -234,4 +242,4 @@ sub postamble {
 
 __END__
 
-#line 363
+#line 371
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index b886046..a39ffde 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,18 +6,18 @@ use Module::Install::Base;
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.70';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 my @scalar_keys = qw{
-    name module_name abstract author version license
-    distribution_type perl_version tests installdirs
+	name module_name abstract author version license
+	distribution_type perl_version tests installdirs
 };
 
 my @tuple_keys = qw{
-    build_requires requires recommends bundles
+	configure_requires build_requires requires recommends bundles
 };
 
 sub Meta            { shift        }
@@ -25,40 +25,37 @@ sub Meta_ScalarKeys { @scalar_keys }
 sub Meta_TupleKeys  { @tuple_keys  }
 
 foreach my $key (@scalar_keys) {
-    *$key = sub {
-        my $self = shift;
-        return $self->{values}{$key} if defined wantarray and !@_;
-        $self->{values}{$key} = shift;
-        return $self;
-    };
+	*$key = sub {
+		my $self = shift;
+		return $self->{values}{$key} if defined wantarray and !@_;
+		$self->{values}{$key} = shift;
+		return $self;
+	};
 }
 
 foreach my $key (@tuple_keys) {
-    *$key = sub {
-        my $self = shift;
-        return $self->{values}{$key} unless @_;
-
-        my @rv;
-        while (@_) {
-            my $module = shift or last;
-            my $version = shift || 0;
-            if ( $module eq 'perl' ) {
-                $version =~ s{^(\d+)\.(\d+)\.(\d+)}
-                             {$1 + $2/1_000 + $3/1_000_000}e;
-                $self->perl_version($version);
-                next;
-            }
-            my $rv = [ $module, $version ];
-            push @rv, $rv;
-        }
-        push @{ $self->{values}{$key} }, @rv;
-        @rv;
-    };
+	*$key = sub {
+		my $self = shift;
+		return $self->{values}{$key} unless @_;
+
+		my @rv;
+		while (@_) {
+			my $module = shift or last;
+			my $version = shift || 0;
+			if ( $module eq 'perl' ) {
+				$version =~ s{^(\d+)\.(\d+)\.(\d+)}
+				             {$1 + $2/1_000 + $3/1_000_000}e;
+				$self->perl_version($version);
+				next;
+			}
+			my $rv = [ $module, $version ];
+			push @rv, $rv;
+		}
+		push @{ $self->{values}{$key} }, @rv;
+		@rv;
+	};
 }
 
-# configure_requires is currently a null-op
-sub configure_requires { 1 }
-
 # Aliases for build_requires that will have alternative
 # meanings in some future version of META.yml.
 sub test_requires      { shift->build_requires(@_)  }
@@ -71,10 +68,10 @@ sub install_as_site    { $_[0]->installdirs('site')   }
 sub install_as_vendor  { $_[0]->installdirs('vendor') }
 
 sub sign {
-    my $self = shift;
-    return $self->{'values'}{'sign'} if defined wantarray and ! @_;
-    $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
-    return $self;
+	my $self = shift;
+	return $self->{'values'}{'sign'} if defined wantarray and ! @_;
+	$self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
+	return $self;
 }
 
 sub dynamic_config {
@@ -88,249 +85,234 @@ sub dynamic_config {
 }
 
 sub all_from {
-    my ( $self, $file ) = @_;
-
-    unless ( defined($file) ) {
-        my $name = $self->name
-            or die "all_from called with no args without setting name() first";
-        $file = join('/', 'lib', split(/-/, $name)) . '.pm';
-        $file =~ s{.*/}{} unless -e $file;
-        die "all_from: cannot find $file from $name" unless -e $file;
-    }
-
-    $self->version_from($file)      unless $self->version;
-    $self->perl_version_from($file) unless $self->perl_version;
-
-    # The remaining probes read from POD sections; if the file
-    # has an accompanying .pod, use that instead
-    my $pod = $file;
-    if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
-        $file = $pod;
-    }
-
-    $self->author_from($file)   unless $self->author;
-    $self->license_from($file)  unless $self->license;
-    $self->abstract_from($file) unless $self->abstract;
+	my ( $self, $file ) = @_;
+
+	unless ( defined($file) ) {
+		my $name = $self->name
+			or die "all_from called with no args without setting name() first";
+		$file = join('/', 'lib', split(/-/, $name)) . '.pm';
+		$file =~ s{.*/}{} unless -e $file;
+		die "all_from: cannot find $file from $name" unless -e $file;
+	}
+
+	$self->version_from($file)      unless $self->version;
+	$self->perl_version_from($file) unless $self->perl_version;
+
+	# The remaining probes read from POD sections; if the file
+	# has an accompanying .pod, use that instead
+	my $pod = $file;
+	if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
+		$file = $pod;
+	}
+
+	$self->author_from($file)   unless $self->author;
+	$self->license_from($file)  unless $self->license;
+	$self->abstract_from($file) unless $self->abstract;
 }
 
 sub provides {
-    my $self     = shift;
-    my $provides = ( $self->{values}{provides} ||= {} );
-    %$provides = (%$provides, @_) if @_;
-    return $provides;
+	my $self     = shift;
+	my $provides = ( $self->{values}{provides} ||= {} );
+	%$provides = (%$provides, @_) if @_;
+	return $provides;
 }
 
 sub auto_provides {
-    my $self = shift;
-    return $self unless $self->is_admin;
-
-    unless (-e 'MANIFEST') {
-        warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
-        return $self;
-    }
-
-    # Avoid spurious warnings as we are not checking manifest here.
-
-    local $SIG{__WARN__} = sub {1};
-    require ExtUtils::Manifest;
-    local *ExtUtils::Manifest::manicheck = sub { return };
-
-    require Module::Build;
-    my $build = Module::Build->new(
-        dist_name    => $self->name,
-        dist_version => $self->version,
-        license      => $self->license,
-    );
-    $self->provides(%{ $build->find_dist_packages || {} });
+	my $self = shift;
+	return $self unless $self->is_admin;
+	unless (-e 'MANIFEST') {
+		warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
+		return $self;
+	}
+	# Avoid spurious warnings as we are not checking manifest here.
+	local $SIG{__WARN__} = sub {1};
+	require ExtUtils::Manifest;
+	local *ExtUtils::Manifest::manicheck = sub { return };
+
+	require Module::Build;
+	my $build = Module::Build->new(
+		dist_name    => $self->name,
+		dist_version => $self->version,
+		license      => $self->license,
+	);
+	$self->provides( %{ $build->find_dist_packages || {} } );
 }
 
 sub feature {
-    my $self     = shift;
-    my $name     = shift;
-    my $features = ( $self->{values}{features} ||= [] );
-
-    my $mods;
-
-    if ( @_ == 1 and ref( $_[0] ) ) {
-        # The user used ->feature like ->features by passing in the second
-        # argument as a reference.  Accomodate for that.
-        $mods = $_[0];
-    } else {
-        $mods = \@_;
-    }
-
-    my $count = 0;
-    push @$features, (
-        $name => [
-            map {
-                ref($_) ? ( ref($_) eq 'HASH' ) ? %$_
-                                                : @$_
-                        : $_
-            } @$mods
-        ]
-    );
-
-    return @$features;
+	my $self     = shift;
+	my $name     = shift;
+	my $features = ( $self->{values}{features} ||= [] );
+	my $mods;
+
+	if ( @_ == 1 and ref( $_[0] ) ) {
+		# The user used ->feature like ->features by passing in the second
+		# argument as a reference.  Accomodate for that.
+		$mods = $_[0];
+	} else {
+		$mods = \@_;
+	}
+
+	my $count = 0;
+	push @$features, (
+		$name => [
+			map {
+				ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_
+			} @$mods
+		]
+	);
+
+	return @$features;
 }
 
 sub features {
-    my $self = shift;
-    while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
-        $self->feature( $name, @$mods );
-    }
-    return $self->{values}->{features}
-    	? @{ $self->{values}->{features} }
-    	: ();
+	my $self = shift;
+	while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
+		$self->feature( $name, @$mods );
+	}
+	return $self->{values}->{features}
+		? @{ $self->{values}->{features} }
+		: ();
 }
 
 sub no_index {
-    my $self = shift;
-    my $type = shift;
-    push @{ $self->{values}{no_index}{$type} }, @_ if $type;
-    return $self->{values}{no_index};
+	my $self = shift;
+	my $type = shift;
+	push @{ $self->{values}{no_index}{$type} }, @_ if $type;
+	return $self->{values}{no_index};
 }
 
 sub read {
-    my $self = shift;
-    $self->include_deps( 'YAML', 0 );
-
-    require YAML;
-    my $data = YAML::LoadFile('META.yml');
-
-    # Call methods explicitly in case user has already set some values.
-    while ( my ( $key, $value ) = each %$data ) {
-        next unless $self->can($key);
-        if ( ref $value eq 'HASH' ) {
-            while ( my ( $module, $version ) = each %$value ) {
-                $self->can($key)->($self, $module => $version );
-            }
-        }
-        else {
-            $self->can($key)->($self, $value);
-        }
-    }
-    return $self;
+	my $self = shift;
+	$self->include_deps( 'YAML', 0 );
+
+	require YAML;
+	my $data = YAML::LoadFile('META.yml');
+
+	# Call methods explicitly in case user has already set some values.
+	while ( my ( $key, $value ) = each %$data ) {
+		next unless $self->can($key);
+		if ( ref $value eq 'HASH' ) {
+			while ( my ( $module, $version ) = each %$value ) {
+				$self->can($key)->($self, $module => $version );
+			}
+		} else {
+			$self->can($key)->($self, $value);
+		}
+	}
+	return $self;
 }
 
 sub write {
-    my $self = shift;
-    return $self unless $self->is_admin;
-    $self->admin->write_meta;
-    return $self;
+	my $self = shift;
+	return $self unless $self->is_admin;
+	$self->admin->write_meta;
+	return $self;
 }
 
 sub version_from {
-    my ( $self, $file ) = @_;
-    require ExtUtils::MM_Unix;
-    $self->version( ExtUtils::MM_Unix->parse_version($file) );
+	require ExtUtils::MM_Unix;
+	my ( $self, $file ) = @_;
+	$self->version( ExtUtils::MM_Unix->parse_version($file) );
 }
 
 sub abstract_from {
-    my ( $self, $file ) = @_;
-    require ExtUtils::MM_Unix;
-    $self->abstract(
-        bless(
-            { DISTNAME => $self->name },
-            'ExtUtils::MM_Unix'
-        )->parse_abstract($file)
-     );
+	require ExtUtils::MM_Unix;
+	my ( $self, $file ) = @_;
+	$self->abstract(
+		bless(
+			{ DISTNAME => $self->name },
+			'ExtUtils::MM_Unix'
+		)->parse_abstract($file)
+	 );
 }
 
 sub _slurp {
-    my ( $self, $file ) = @_;
-
-    local *FH;
-    open FH, "< $file" or die "Cannot open $file.pod: $!";
-    do { local $/; <FH> };
+	local *FH;
+	open FH, "< $_[1]" or die "Cannot open $_[1].pod: $!";
+	do { local $/; <FH> };
 }
 
 sub perl_version_from {
-    my ( $self, $file ) = @_;
-
-    if (
-        $self->_slurp($file) =~ m/
-        ^
-        use \s*
-        v?
-        ([\d_\.]+)
-        \s* ;
-    /ixms
-      )
-    {
-        my $v = $1;
-        $v =~ s{_}{}g;
-        $self->perl_version($1);
-    }
-    else {
-        warn "Cannot determine perl version info from $file\n";
-        return;
-    }
+	my ( $self, $file ) = @_;
+	if (
+		$self->_slurp($file) =~ m/
+		^
+		use \s*
+		v?
+		([\d_\.]+)
+		\s* ;
+		/ixms
+	) {
+		my $v = $1;
+		$v =~ s{_}{}g;
+		$self->perl_version($1);
+	} else {
+		warn "Cannot determine perl version info from $file\n";
+		return;
+	}
 }
 
 sub author_from {
-    my ( $self, $file ) = @_;
-    my $content = $self->_slurp($file);
-    if ($content =~ m/
-        =head \d \s+ (?:authors?)\b \s*
-        ([^\n]*)
-        |
-        =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
-        .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
-        ([^\n]*)
-    /ixms) {
-        my $author = $1 || $2;
-        $author =~ s{E<lt>}{<}g;
-        $author =~ s{E<gt>}{>}g;
-        $self->author($author); 
-    }
-    else {
-        warn "Cannot determine author info from $file\n";
-    }
+	my ( $self, $file ) = @_;
+	my $content = $self->_slurp($file);
+	if ($content =~ m/
+		=head \d \s+ (?:authors?)\b \s*
+		([^\n]*)
+		|
+		=head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
+		.*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
+		([^\n]*)
+	/ixms) {
+		my $author = $1 || $2;
+		$author =~ s{E<lt>}{<}g;
+		$author =~ s{E<gt>}{>}g;
+		$self->author($author);
+	} else {
+		warn "Cannot determine author info from $file\n";
+	}
 }
 
 sub license_from {
-    my ( $self, $file ) = @_;
-
-    if (
-        $self->_slurp($file) =~ m/
-        (
-            =head \d \s+
-            (?:licen[cs]e|licensing|copyright|legal)\b
-            .*?
-        )
-        (=head\\d.*|=cut.*|)
-        \z
-    /ixms
-      )
-    {
-        my $license_text = $1;
-        my @phrases      = (
-            'under the same (?:terms|license) as perl itself' => 'perl',        1,
-            'GNU public license'                              => 'gpl',         1,
-            'GNU lesser public license'                       => 'gpl',         1,
-            'BSD license'                                     => 'bsd',         1,
-            'Artistic license'                                => 'artistic',    1,
-            'GPL'                                             => 'gpl',         1,
-            'LGPL'                                            => 'lgpl',        1,
-            'BSD'                                             => 'bsd',         1,
-            'Artistic'                                        => 'artistic',    1,
-            'MIT'                                             => 'mit',         1,
-            'proprietary'                                     => 'proprietary', 0,
-        );
-        while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
-            $pattern =~ s{\s+}{\\s+}g;
-            if ( $license_text =~ /\b$pattern\b/i ) {
-                if ( $osi and $license_text =~ /All rights reserved/i ) {
-                        warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+	my ( $self, $file ) = @_;
+
+	if (
+		$self->_slurp($file) =~ m/
+		(
+			=head \d \s+
+			(?:licen[cs]e|licensing|copyright|legal)\b
+			.*?
+		)
+		(=head\\d.*|=cut.*|)
+		\z
+	/ixms ) {
+		my $license_text = $1;
+		my @phrases      = (
+			'under the same (?:terms|license) as perl itself' => 'perl',        1,
+			'GNU public license'                              => 'gpl',         1,
+			'GNU lesser public license'                       => 'lgpl',        1,
+			'BSD license'                                     => 'bsd',         1,
+			'Artistic license'                                => 'artistic',    1,
+			'GPL'                                             => 'gpl',         1,
+			'LGPL'                                            => 'lgpl',        1,
+			'BSD'                                             => 'bsd',         1,
+			'Artistic'                                        => 'artistic',    1,
+			'MIT'                                             => 'mit',         1,
+			'proprietary'                                     => 'proprietary', 0,
+		);
+		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
+			$pattern =~ s{\s+}{\\s+}g;
+			if ( $license_text =~ /\b$pattern\b/i ) {
+				if ( $osi and $license_text =~ /All rights reserved/i ) {
+					warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+				}
+				$self->license($license);
+				return 1;
+			}
 		}
-                $self->license($license);
-                return 1;
-            }
-        }
-    }
-
-    warn "Cannot determine license info from $file\n";
-    return 'unknown';
+	}
+
+	warn "Cannot determine license info from $file\n";
+	return 'unknown';
 }
 
 1;
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index c725f5c..80a8b5c 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -1,11 +1,15 @@
 #line 1
 package Module::Install::RTx;
-use Module::Install::Base;
- at ISA = qw(Module::Install::Base);
-
-$Module::Install::RTx::VERSION = '0.20';
 
+use 5.008;
 use strict;
+use warnings;
+no warnings 'once';
+
+use Module::Install::Base;
+use base 'Module::Install::Base';
+our $VERSION = '0.23';
+
 use FindBin;
 use File::Glob     ();
 use File::Basename ();
@@ -21,10 +25,10 @@ sub RTx {
 
     $self->name("$RTx-$name")
         unless $self->name;
+    $self->all_from( -e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm" )
+        unless $self->version;
     $self->abstract("RT $name Extension")
         unless $self->abstract;
-    $self->version_from( -e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm" )
-        unless $self->version;
 
     my @prefixes = (qw(/opt /usr/local /home /usr /sw ));
     my $prefix   = $ENV{PREFIX};
@@ -49,6 +53,7 @@ sub RTx {
     }
 
     my $lib_path = File::Basename::dirname( $INC{'RT.pm'} );
+    my $local_lib_path = "$RT::LocalPath/lib";
     print "Using RT configuration from $INC{'RT.pm'}:\n";
     unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
 
@@ -60,11 +65,14 @@ sub RTx {
     my $with_subdirs = $ENV{WITH_SUBDIRS};
     @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
         @ARGV;
-    my %subdirs = map { $_ => 1 } split( /\s*,\s*/, $with_subdirs );
+
+    my %subdirs;
+    %subdirs = map { $_ => 1 } split( /\s*,\s*/, $with_subdirs )
+        if defined $with_subdirs;
 
     foreach (qw(bin etc html po sbin var)) {
         next unless -d "$FindBin::Bin/$_";
-        next if %subdirs and !$subdirs{$_};
+        next if keys %subdirs and !$subdirs{$_};
         $self->no_index( directory => $_ );
 
         no strict 'refs';
@@ -73,7 +81,7 @@ sub RTx {
     }
 
     $path{$_} .= "/$name" for grep $path{$_}, qw(etc po var);
-    $path{lib} = "$RT::LocalPath/lib" unless %subdirs and !$subdirs{'lib'};
+    $path{lib} = "$RT::LocalPath/lib" unless keys %subdirs and !$subdirs{'lib'};
 
     # If we're running on RT 3.8 with plugin support, we really wany
     # to install libs, mason templates and po files into plugin specific
@@ -118,10 +126,10 @@ install ::
         $self->load('RTxFactory');
         $self->postamble(<< ".");
 factory ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name))"
 
 dropdb ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name drop))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name drop))"
 
 .
     }
@@ -146,13 +154,13 @@ dropdb ::
         print "For first-time installation, type 'make initdb'.\n";
         my $initdb = '';
         $initdb .= <<"." if $has_etc{schema};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema))"
 .
         $initdb .= <<"." if $has_etc{acl};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl))"
 .
         $initdb .= <<"." if $has_etc{initialdata};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert))"
 .
         $self->postamble("initdb ::\n$initdb\n");
         $self->postamble("initialize-database ::\n$initdb\n");
@@ -172,6 +180,4 @@ sub RTxInit {
 
 __END__
 
-#line 239
-
-#line 260
+#line 281
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index 612dc30..21a81ab 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -4,11 +4,11 @@ package Module::Install::Win32;
 use strict;
 use Module::Install::Base;
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.67';
-	$ISCORE  = 1;
+	$VERSION = '0.70';
 	@ISA     = qw{Module::Install::Base};
+	$ISCORE  = 1;
 }
 
 # determine if the user needs nmake, and download it if needed
@@ -16,7 +16,7 @@ sub check_nmake {
 	my $self = shift;
 	$self->load('can_run');
 	$self->load('get_file');
-	
+
 	require Config;
 	return unless (
 		$^O eq 'MSWin32'                     and
@@ -38,8 +38,7 @@ sub check_nmake {
 		remove    => 1,
 	);
 
-	if (!$rv) {
-        die <<'END_MESSAGE';
+	die <<'END_MESSAGE' unless $rv;
 
 -------------------------------------------------------------------------------
 
@@ -59,7 +58,7 @@ You may then resume the installation process described in README.
 
 -------------------------------------------------------------------------------
 END_MESSAGE
-	}
+
 }
 
 1;
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index e1db381..a05592d 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -4,40 +4,37 @@ package Module::Install::WriteAll;
 use strict;
 use Module::Install::Base;
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.67';
-	$ISCORE  = 1;
+	$VERSION = '0.70';
 	@ISA     = qw{Module::Install::Base};
+	$ISCORE  = 1;
 }
 
 sub WriteAll {
-    my $self = shift;
-    my %args = (
-        meta        => 1,
-        sign        => 0,
-        inline      => 0,
-        check_nmake => 1,
-        @_
-    );
+	my $self = shift;
+	my %args = (
+		meta        => 1,
+		sign        => 0,
+		inline      => 0,
+		check_nmake => 1,
+		@_,
+	);
+
+	$self->sign(1)                if $args{sign};
+	$self->Meta->write            if $args{meta};
+	$self->admin->WriteAll(%args) if $self->is_admin;
 
-    $self->sign(1)                if $args{sign};
-    $self->Meta->write            if $args{meta};
-    $self->admin->WriteAll(%args) if $self->is_admin;
+	$self->check_nmake if $args{check_nmake};
+	unless ( $self->makemaker_args->{PL_FILES} ) {
+		$self->makemaker_args( PL_FILES => {} );
+	}
 
-    if ( $0 =~ /Build.PL$/i ) {
-        $self->Build->write;
-    } else {
-        $self->check_nmake if $args{check_nmake};
-        unless ( $self->makemaker_args->{'PL_FILES'} ) {
-        	$self->makemaker_args( PL_FILES => {} );
-        }
-        if ($args{inline}) {
-            $self->Inline->write;
-        } else {
-            $self->Makefile->write;
-        }
-    }
+	if ( $args{inline} ) {
+		$self->Inline->write;
+	} else {
+		$self->Makefile->write;
+	}
 }
 
 1;

commit 034366ae132b1236fc10545f85d95e41cc6af3f5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jun 5 19:53:22 2008 +0000

    * fix bug when dealing with non-cfs

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 07b07d2..3eba902 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -34,7 +34,7 @@ unless ( $default ) {
     my $request_args = $m->request_args();
     if ( $field_type eq 'core' && $request_args->{$name} ) {
         $default = $request_args->{$name};
-    } elsif ( $cf->Id ) {
+    } elsif ( $field_type eq 'custom' &&  $cf->Id ) {
         $default = ($request_args->{$NamePrefix.$cf->Id."-Value"} || 
                     $request_args->{$NamePrefix.$cf->Id."-Values"} );
     }

commit 855e18f4a729c6c7de8538e8ee580cf9879e7d4f
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jun 5 20:01:17 2008 +0000

    * remove unused dir

commit bb643b638a581157684f5fd38fc0ff93297f9d42
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jun 5 20:01:51 2008 +0000

    * remove debugging

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 3eba902..34746e7 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -38,7 +38,6 @@ unless ( $default ) {
         $default = ($request_args->{$NamePrefix.$cf->Id."-Value"} || 
                     $request_args->{$NamePrefix.$cf->Id."-Values"} );
     }
-    $RT::Logger->error("default $default for name $name") if $default;
 }
 
 </%init>

commit fc6b7114a3d4899069d185c0d0d1a3b6962b97cc
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 6 15:48:23 2008 +0000

    * handle default values for Dates

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 34746e7..39c5649 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -30,6 +30,7 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
     $field_label ||= $cf->Name;
 }
 
+
 unless ( $default ) {
     my $request_args = $m->request_args();
     if ( $field_type eq 'core' && $request_args->{$name} ) {
@@ -100,7 +101,8 @@ unless ( $default ) {
 
 % }
 % } elsif ($render_as =~  /^date/i)  {
-<& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0 &>
+<& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0, 
+                         ($default ? (Default => $default) : ()) &>
 % } else {
 % die "'$render_as' isn't a valid rendering option for field '$name'";
 %}

commit cc8ac9c09905c8ade87d1f7498348107122a9d91
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 6 15:49:08 2008 +0000

    * $m->notes takes an arrayref, not a list

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 39c5649..46cb01c 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -14,8 +14,8 @@ my $field_label ||= $label;
 my $cf;
 if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
     $field_type = 'core';
-    $m->notes(
-        core_fields_on_page => ( $m->notes('core_fields_on_page'), $name ) );
+    my $res = $m->notes(
+        core_fields_on_page => [ @{$m->notes('core_fields_on_page')||[]}, $name ] );
     $field_label ||= $name;
 } else {
 
@@ -26,7 +26,7 @@ if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
             . $queue->Name;
     }
 
-    $m->notes( cfs_on_page => ( $m->notes('cfs_on_page'), $cf->id ) );
+    $m->notes( cfs_on_page => [ @{$m->notes('cfs_on_page')||[]}, $cf->id ] );
     $field_label ||= $cf->Name;
 }
 
diff --git a/html/FormTools/Form b/html/FormTools/Form
index 5d5b08b..0e4980e 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -5,8 +5,8 @@ $include_header => 1
 <%init>
 my $content = $m->content;
 
-my %cfs = map { $_ => 1} $m->notes('cfs_on_page') || ();
-my %core_fields = map { $_ => 1} $m->notes('core_fields_on_page') || ();
+my %cfs = map { $_ => 1} @{ $m->notes('cfs_on_page') || [] };
+my %core_fields = map { $_ => 1} @{ $m->notes('core_fields_on_page') || [] };
 
 my %request_args = $m->request_args;
 

commit 79302ae3b8843d8c6d5a41d34233e8c3d5156b4b
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 6 15:49:19 2008 +0000

    * since we don't name fields CoreField-Subject (and doing so
      would mean magic frobbing of request_args before Create)
      share the meaning of what a CoreField is with a library function

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 46cb01c..c75f0fc 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -12,7 +12,8 @@ my $queue      = $m->notes('queue');
 my $field_type = 'custom';
 my $field_label ||= $label;
 my $cf;
-if ( $name =~ /^(Requestors|Cc|AdminCc|Subject)$/i ) {
+
+if ( RT::Extension::FormTools::is_core_field($name) ) {
     $field_type = 'core';
     my $res = $m->notes(
         core_fields_on_page => [ @{$m->notes('core_fields_on_page')||[]}, $name ] );
diff --git a/html/FormTools/Form b/html/FormTools/Form
index 0e4980e..771d21e 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -17,7 +17,7 @@ foreach my $key (keys %request_args) {
 }
 
 foreach my $key (keys %request_args) {
-   next unless ($key =~ /CoreField-(\d+)/ );
+   next unless RT::Extension::FormTools::is_core_field($key);
    my $field = $1;
    delete $request_args{$key} if ($core_fields{$field});
 }
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 5683d0f..0575b87 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,4 +3,22 @@ use strict;
 
 package RT::Extension::FormTools;
 
+our $VERSION = '0.03';
+
+=head2 is_core_field
+
+passed one argument (field name) and checks if
+that is a field that we consider 'core' to
+RT (subject, AdminCc, etc) rather than something
+which should be treated as a Custom Field.
+
+Naming a Custom Field Subject would cause
+serious pain with FormTools
+
+=cut
+
+sub is_core_field {
+   return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject)$/;
+}
+
 1;

commit ee204e51fec25f177fa2569577c447b5a5d70595
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 13 00:49:11 2008 +0000

    * fix use error

diff --git a/Makefile.PL b/Makefile.PL
index aecb5a8..206dbca 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,5 +1,7 @@
 use inc::Module::Install;
 RTx('RT-Extension-FormTools');
 
+all_from('lib/RT/Extension/FormTools.pm');
+
 WriteAll();
 
diff --git a/html/FormTools/Field b/html/FormTools/Field
index c75f0fc..525ae09 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -7,6 +7,7 @@ $cols => undef
 $empty_allowed => 1
 </%args>
 <%init>
+use RT::Extension::FormTools;
 my $NamePrefix = "Object-RT::Ticket--CustomField-";
 my $queue      = $m->notes('queue');
 my $field_type = 'custom';
diff --git a/html/FormTools/Form b/html/FormTools/Form
index 771d21e..5fe4c6e 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -3,6 +3,7 @@ $next
 $include_header => 1
 </%args>
 <%init>
+use RT::Extension::FormTools;
 my $content = $m->content;
 
 my %cfs = map { $_ => 1} @{ $m->notes('cfs_on_page') || [] };

commit f9cf8a5feb77f3a5a38d6482d1084c052403c173
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 13 00:50:37 2008 +0000

    * fix core field handling

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 5fe4c6e..fd40e53 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -19,8 +19,7 @@ foreach my $key (keys %request_args) {
 
 foreach my $key (keys %request_args) {
    next unless RT::Extension::FormTools::is_core_field($key);
-   my $field = $1;
-   delete $request_args{$key} if ($core_fields{$field});
+   delete $request_args{$key} if ($core_fields{$key});
 }
 
 </%init>

commit b05a3bf086219e43243f422a2ad1997c242ccb1b
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Wed Dec 10 19:59:17 2008 +0000

    UpdateContent (the big message box) is a core field

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 0575b87..ef0e5cb 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -18,7 +18,7 @@ serious pain with FormTools
 =cut
 
 sub is_core_field {
-   return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject)$/;
+   return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent)$/;
 }
 
 1;

commit 127722a9596143947ff429085cc43057c3395613
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Wed Dec 10 20:11:05 2008 +0000

    If the field is UpdateContent, then display a messagebox

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 525ae09..3f8178b 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -44,9 +44,19 @@ unless ( $default ) {
 }
 
 </%init>
+
+% if ($field_type eq 'core' && $name eq 'UpdateContent') {
+
+<& /Elements/MessageBox, Name => $name, IncludeSignature => 0 &>
+
+% } else {
+
 <table style="display: inline; "><tr><th valign="top"><label><%$field_label%></label></th><td style="display:block;">
+
 % if ($field_type eq 'core') {
+
 <input type="text" name=<%$name%> size="20" value="<%$default%>">
+
 % } else {
 
 
@@ -111,3 +121,4 @@ unless ( $default ) {
 
 % }
 </td></tr></table>
+% }

commit 2b1a3c3ef015797d382c97afc1f814a714fb05b0
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Wed Dec 10 21:01:48 2008 +0000

    First stab at handling the default Attach field

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 3f8178b..bd1b81f 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -55,10 +55,19 @@ unless ( $default ) {
 
 % if ($field_type eq 'core') {
 
-<input type="text" name=<%$name%> size="20" value="<%$default%>">
+% if ($name eq 'Attach') {
+
+<input name="<%$name%>" type="file" />
+<input type="hidden" class="hidden" name="UpdateAttach" value="1" />
 
 % } else {
 
+<input type="text" name=<%$name%> size="20" value="<%$default%>">
+
+% }
+
+% } else { # CF
+
 
 % if ($render_as eq 'normal') {
     <& /Elements/EditCustomField, Object => $queue, CustomField => $cf, NamePrefix => $NamePrefix, 
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index ef0e5cb..6be1af8 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -18,7 +18,7 @@ serious pain with FormTools
 =cut
 
 sub is_core_field {
-   return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent)$/;
+   return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent|Attach)$/;
 }
 
 1;

commit f78f4141be1daebce8b69ff85f8f9b4e0a60e928
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Dec 11 17:52:35 2008 +0000

    add cf validation support.

diff --git a/html/FormTools/Form b/html/FormTools/Form
index fd40e53..45403cc 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -1,6 +1,7 @@
 <%args>
 $next
 $include_header => 1
+$validation => 0
 </%args>
 <%init>
 use RT::Extension::FormTools;
@@ -11,6 +12,30 @@ my %core_fields = map { $_ => 1} @{ $m->notes('core_fields_on_page') || [] };
 
 my %request_args = $m->request_args;
 
+my @results;
+my $real_next = delete $request_args{_form_tools_next};
+if ($validation && $real_next) {
+    my $queue = $m->notes('queue');
+    foreach my $key (keys %request_args) {
+        next if $key =~ /Values-Magic$/;
+        next unless ($key =~ /CustomField-(\d+)/ );
+        my $id = $1;
+        my $cf = RT::CustomField->new($session{'CurrentUser'});
+        $cf->Load($id);
+        next unless exists $request_args{"Object-RT::Ticket--CustomField-@{[ $cf->Id ]}-Values-Magic"};
+        my ($ok, @res) = RT::Extension::FormTools::validate_cf($cf, \%request_args);
+        push @results, @res unless $ok;
+
+    }
+    unless (@results) {
+        my $next_comp = $real_next;
+        $real_next = $m->caller(1)->dir_path . '/' . $real_next
+            unless $real_next =~ m'^/';
+        $m->subexec("$real_next", %ARGS, %request_args);
+        $m->abort;
+    }
+}
+
 foreach my $key (keys %request_args) {
    next unless ($key =~ /CustomField-(\d+)/ );
    my $cf = $1;
@@ -28,9 +53,17 @@ foreach my $key (keys %request_args) {
 <& /Elements/PageLayout, title => $m->notes('page_title') &>
 % }
 
-<form method="POST" action="<%$next%>" enctype="multipart/form-data">
+<& /Elements/ListActions, actions => \@results &>
+
+<form method="POST" action="<% $validation ? $m->caller(1)->path : $next %>" enctype="multipart/form-data">
+% if ($validation) {
+<input type="hidden" name="_form_tools_next" value="<%$next%>" />
+% }
 <%$content|n%>
 
+%# XXX: we should only pass CFs and core fields.  this is causing
+%# username/password to be bypassed if we are logining directly on a
+%# formtool page.
 % foreach my $key (keys %request_args) {
 % next if (ref $request_args{$key} && ref $request_args{$key} ne 'ARRAY');
 % foreach my $val ( ref ($request_args{$key}) ? @{$request_args{$key}} : ($request_args{$key})) {
diff --git a/html/FormTools/ShowChoices b/html/FormTools/ShowChoices
index 3111632..9dfd6f8 100644
--- a/html/FormTools/ShowChoices
+++ b/html/FormTools/ShowChoices
@@ -11,7 +11,7 @@ my %all_fields = $m->request_args;
 % my $id = $1;
 %$cf->Load($id);
 <tr><td><b><%$cf->Name%></b></td><td><% ref ($all_fields{$field}) ? join(', ',@{$all_fields{$field}}) : $all_fields{$field}%></td></tr>
-% } else {
+% } elsif (RT::Extension::FormTools::is_core_field($field)) {
 
 <tr><td><b><%$field%></b></td><td><% $all_fields{$field} %></td></tr>
 %}
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 6be1af8..d1ee997 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -21,4 +21,48 @@ sub is_core_field {
    return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent|Attach)$/;
 }
 
+sub validate_cf {
+    my ($CF, $ARGSRef) = @_;
+    my $NamePrefix = "Object-RT::Ticket--CustomField-";
+    my $field = $NamePrefix . $CF->Id . "-Value";
+    my $valid = 1;
+    my $value;
+    my @res;
+    if ($ARGSRef->{"${field}s-Magic"} and exists $ARGSRef->{"${field}s"}) {
+        $value = $ARGSRef->{"${field}s"};
+        # We only validate Single Combos -- multis can never be user input
+        next if ref $value;
+    }
+    else {
+        $value = $ARGSRef->{$field};
+    }
+
+    my @values = ();
+    if ( ref $value eq 'ARRAY' ) {
+        @values = @$value;
+    } elsif ( $CF->Type =~ /text/i ) {
+        @values = ($value);
+    } else {
+        @values = split /\r*\n/, ( defined $value ? $value : '');
+    }
+    @values = grep $_ ne '',
+        map {
+            s/\r+\n/\n/g;
+            s/^\s+//;
+            s/\s+$//;
+            $_;
+        }
+        grep defined, @values;
+    @values = ('') unless @values;
+
+    foreach my $value( @values ) {
+        next if $CF->MatchPattern($value);
+
+        my $msg = "Input must match ". $CF->FriendlyPattern;
+        push @res, $msg;
+        $valid = 0;
+    }
+    return ($valid, @res);
+}
+
 1;

commit 17afcc0772326e6365875a51f523b6411a0ad397
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu Dec 11 20:31:49 2008 +0000

    show cf validation information in the formtools ui

diff --git a/html/FormTools/Field b/html/FormTools/Field
index bd1b81f..6b84f3c 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -76,6 +76,10 @@ unless ( $default ) {
             ($default ? (Default => $default) : ())
             
             &>
+% if ($cf->FriendlyPattern) {
+    <% loc("Input must match [_1]", $cf->FriendlyPattern) %>
+%}
+
 % } elsif ($render_as =~ /^radio/)  {
 %       my $selected = 0;
 %       my $id = $NamePrefix . $cf->Id;

commit f2d8153b1c62c675e822bd1a395ea445f2598981
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Mon Dec 15 20:50:50 2008 +0000

    Remove inc/.author

commit 1adb47c58b50aabe414a5859cbd1f7535e941197
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Mon Dec 15 20:56:44 2008 +0000

    Only display CF validation if the caller requests it, it uglies up existing forms

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 6b84f3c..7b56fe6 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -5,6 +5,7 @@ $render_as => 'normal'
 $default => undef
 $cols => undef
 $empty_allowed => 1
+$show_validation => 0
 </%args>
 <%init>
 use RT::Extension::FormTools;
@@ -76,7 +77,7 @@ unless ( $default ) {
             ($default ? (Default => $default) : ())
             
             &>
-% if ($cf->FriendlyPattern) {
+% if ($show_validation && $cf->FriendlyPattern) {
     <% loc("Input must match [_1]", $cf->FriendlyPattern) %>
 %}
 

commit 5430bf178fb02fb8627c9c74ffd1b81126c67558
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Mon Dec 15 23:52:32 2008 +0000

    Use a hash lookup for is_core_field instead of a regex

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index d1ee997..cbe0031 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -17,8 +17,17 @@ serious pain with FormTools
 
 =cut
 
+my %is_core_field = map { $_ => 1 } qw(
+    Requestors
+    Cc
+    AdminCc
+    Subject
+    UpdateContent
+    Attach
+);
+
 sub is_core_field {
-   return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent|Attach)$/;
+   return $is_core_field{ $_[0] };
 }
 
 sub validate_cf {

commit d3ee60a5fe93cef2c61c63dc3b821c425ed5cdbb
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Mon Dec 15 23:53:40 2008 +0000

    The message box field should be called Content not UpdateContent

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 7b56fe6..46c1b62 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -46,7 +46,7 @@ unless ( $default ) {
 
 </%init>
 
-% if ($field_type eq 'core' && $name eq 'UpdateContent') {
+% if ($field_type eq 'core' && $name eq 'Content') {
 
 <& /Elements/MessageBox, Name => $name, IncludeSignature => 0 &>
 
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index cbe0031..cd5b5d0 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -22,7 +22,7 @@ my %is_core_field = map { $_ => 1 } qw(
     Cc
     AdminCc
     Subject
-    UpdateContent
+    Content
     Attach
 );
 

commit b19083ad86e4c78c32dfb6475923e3abbabff44c
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Dec 16 09:45:34 2008 +0000

    allowed field validation to be registered.

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 45403cc..e810cb3 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -16,6 +16,21 @@ my @results;
 my $real_next = delete $request_args{_form_tools_next};
 if ($validation && $real_next) {
     my $queue = $m->notes('queue');
+    # registered validation
+    if (my $validation = $m->notes('validation')) {
+        while (my ($key, $validator) = each (%$validation)) {
+            if (!ref $validator) {
+                my $code = RT::Extension::FormTools->can($validator);
+                my ($ok, $res) = $code->($request_args{$key});
+                push @results, "$key: $res" unless $ok;
+            }
+            else {
+                warn "unknown validator for $key, ignoring."
+            }
+        }
+    }
+
+    # cf validation based on record pattern
     foreach my $key (keys %request_args) {
         next if $key =~ /Values-Magic$/;
         next unless ($key =~ /CustomField-(\d+)/ );
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index cd5b5d0..1b24085 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -74,4 +74,12 @@ sub validate_cf {
     return ($valid, @res);
 }
 
+sub email_is_privileged {
+    my $email = shift;
+    my $user = RT::User->new($RT::SystemUser);
+    $user->LoadByEmail($email);
+    return (1) if ($user->id && $user->Privileged);
+    return (0, "Invalid account: $email");
+}
+
 1;

commit 08d4f36b33087020e35f17bcd450ba16567c3c01
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Dec 23 00:54:37 2008 +0000

    Bump the version number

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 1b24085..fbe1615 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::FormTools;
 
-our $VERSION = '0.03';
+our $VERSION = '0.04';
 
 =head2 is_core_field
 

commit 5433e25ff11488c2d2ac8614318c7321704a3ace
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Dec 23 02:34:10 2008 +0000

    Extra labels for checkbox items

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 46c1b62..4f27639 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -1,6 +1,7 @@
 <%args>
 $name
 $label => undef
+$item_labels => {}
 $render_as => 'normal'
 $default => undef
 $cols => undef
@@ -121,6 +122,11 @@ unless ( $default ) {
 %       }
 % }
             ><% $value->Name%>
+
+% if (defined $item_labels->{$value->Name}) {
+    <% $item_labels->{$value->Name} %>
+% }
+
 %        if ($render_as =~ /vertical/) { 
             <br/>
 %        }

commit 2f301d65fbe70cfa9fbf1ab480c7770f5160b298
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Wed Jan 7 09:01:52 2009 +0000

    allow render_as hidden for core fields.

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 4f27639..4ce0605 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -53,7 +53,9 @@ unless ( $default ) {
 
 % } else {
 
+% if ($render_as ne 'hidden') { # no label if hidden
 <table style="display: inline; "><tr><th valign="top"><label><%$field_label%></label></th><td style="display:block;">
+% }
 
 % if ($field_type eq 'core') {
 
@@ -62,6 +64,10 @@ unless ( $default ) {
 <input name="<%$name%>" type="file" />
 <input type="hidden" class="hidden" name="UpdateAttach" value="1" />
 
+% } elsif ($render_as eq 'hidden') {
+
+<input type="hidden" name=<%$name%> value="<%$default%>">
+
 % } else {
 
 <input type="text" name=<%$name%> size="20" value="<%$default%>">

commit ba38ec132044910317b365504418ba9066b1f599
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Wed Jan 7 09:08:03 2009 +0000

    properly skip validating multis.

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index fbe1615..2514cdb 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -40,7 +40,7 @@ sub validate_cf {
     if ($ARGSRef->{"${field}s-Magic"} and exists $ARGSRef->{"${field}s"}) {
         $value = $ARGSRef->{"${field}s"};
         # We only validate Single Combos -- multis can never be user input
-        next if ref $value;
+        return ($valid) if ref $value;
     }
     else {
         $value = $ARGSRef->{$field};

commit f0d212d9221fb55dfc82a70bf24aeff53f2e5d97
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Jan 8 02:06:02 2009 +0000

    0.05

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 2514cdb..d3d80ce 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::FormTools;
 
-our $VERSION = '0.04';
+our $VERSION = '0.05';
 
 =head2 is_core_field
 

commit f59614b3cb9fa7608f229e4e2eb877e105371828
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Apr 7 02:29:03 2009 +0000

    Implement render_as => 'readonly'

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 4ce0605..f0f4e6f 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -68,6 +68,10 @@ unless ( $default ) {
 
 <input type="hidden" name=<%$name%> value="<%$default%>">
 
+% } elsif ($render_as eq 'readonly') {
+
+<% $default %>
+
 % } else {
 
 <input type="text" name=<%$name%> size="20" value="<%$default%>">
@@ -141,6 +145,9 @@ unless ( $default ) {
 % } elsif ($render_as =~  /^date/i)  {
 <& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0, 
                          ($default ? (Default => $default) : ()) &>
+
+% } elsif ($render_as eq 'readonly') {
+    <% $default %>
 % } else {
 % die "'$render_as' isn't a valid rendering option for field '$name'";
 %}

commit 5cece3371f8181833e2b2338e2a827c2d05877fd
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Apr 7 03:16:53 2009 +0000

    Pass all args to the submit button

diff --git a/html/FormTools/Next b/html/FormTools/Next
index 6cf7b01..9038f37 100644
--- a/html/FormTools/Next
+++ b/html/FormTools/Next
@@ -1 +1 @@
-<& /Elements/Submit &>
+<& /Elements/Submit, %ARGS &>

commit 140a1afb3150981246030e6453c9d59333290849
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Apr 7 04:37:21 2009 +0000

    Basic support for accepting a ticket and its values instead of a queue

diff --git a/html/FormTools/Field b/html/FormTools/Field
index f0f4e6f..87d9c24 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -12,15 +12,20 @@ $show_validation => 0
 use RT::Extension::FormTools;
 my $NamePrefix = "Object-RT::Ticket--CustomField-";
 my $queue      = $m->notes('queue');
+my $ticket     = $m->notes('ticket');
 my $field_type = 'custom';
 my $field_label ||= $label;
 my $cf;
 
+$queue = $ticket->QueueObj
+    if !$queue && $ticket;
+
 if ( RT::Extension::FormTools::is_core_field($name) ) {
     $field_type = 'core';
     my $res = $m->notes(
         core_fields_on_page => [ @{$m->notes('core_fields_on_page')||[]}, $name ] );
     $field_label ||= $name;
+    $default ||= $ticket->$name if $ticket;
 } else {
 
     $cf = RT::CustomField->new( $session{'CurrentUser'} );
@@ -32,6 +37,7 @@ if ( RT::Extension::FormTools::is_core_field($name) ) {
 
     $m->notes( cfs_on_page => [ @{$m->notes('cfs_on_page')||[]}, $cf->id ] );
     $field_label ||= $cf->Name;
+    $default ||= $ticket->FirstCustomFieldValue($name) if $ticket;
 }
 
 

commit 87c4163cb4349bf0a7b7a1e34eac603f0eb4d8e1
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Apr 7 04:43:58 2009 +0000

    Core field might be transaction-based like Content

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 87d9c24..e08f071 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -25,7 +25,7 @@ if ( RT::Extension::FormTools::is_core_field($name) ) {
     my $res = $m->notes(
         core_fields_on_page => [ @{$m->notes('core_fields_on_page')||[]}, $name ] );
     $field_label ||= $name;
-    $default ||= $ticket->$name if $ticket;
+    $default ||= $ticket->$name if $ticket && $ticket->can($name);
 } else {
 
     $cf = RT::CustomField->new( $session{'CurrentUser'} );

commit b0086ca5e542d584b11c20bf618d3074dbeb2797
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 8 15:57:46 2009 +0000

    * if we have a Ticket, we want to associate the CF that we're
      editing with that ticket, rather than with an uncreated ticket

diff --git a/html/FormTools/Field b/html/FormTools/Field
index e08f071..0a15375 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -13,6 +13,9 @@ use RT::Extension::FormTools;
 my $NamePrefix = "Object-RT::Ticket--CustomField-";
 my $queue      = $m->notes('queue');
 my $ticket     = $m->notes('ticket');
+if ($ticket && $ticket->Id) {
+    $NamePrefix = "Object-RT::Ticket-".$ticket->Id."-CustomField-";
+}
 my $field_type = 'custom';
 my $field_label ||= $label;
 my $cf;

commit f73321e578cedd9a031c85a57cd906c5f9469c15
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Thu Apr 9 07:30:37 2009 +0000

    If we have a ticket, then we can construct a more useful name prefix

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 0a15375..239124d 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -10,7 +10,6 @@ $show_validation => 0
 </%args>
 <%init>
 use RT::Extension::FormTools;
-my $NamePrefix = "Object-RT::Ticket--CustomField-";
 my $queue      = $m->notes('queue');
 my $ticket     = $m->notes('ticket');
 if ($ticket && $ticket->Id) {
@@ -23,6 +22,10 @@ my $cf;
 $queue = $ticket->QueueObj
     if !$queue && $ticket;
 
+my $NamePrefix = "Object-RT::Ticket-"
+               . ($ticket ? $ticket->id : '')
+               . "-CustomField-";
+
 if ( RT::Extension::FormTools::is_core_field($name) ) {
     $field_type = 'core';
     my $res = $m->notes(

commit a94ffe01123ba49438a51c801d20b4f1fda95402
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Thu Apr 9 08:39:49 2009 +0000

    Allow coderef validators

diff --git a/html/FormTools/Form b/html/FormTools/Form
index e810cb3..eb7cbf6 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -19,14 +19,20 @@ if ($validation && $real_next) {
     # registered validation
     if (my $validation = $m->notes('validation')) {
         while (my ($key, $validator) = each (%$validation)) {
-            if (!ref $validator) {
-                my $code = RT::Extension::FormTools->can($validator);
-                my ($ok, $res) = $code->($request_args{$key});
-                push @results, "$key: $res" unless $ok;
+            if (ref($validator) eq 'CODE') {
+                # no op
+            }
+            elsif (!ref($validator)) {
+                 my $method_name = $validator;
+                 $validator = RT::Extension::FormTools->can($method_name);
             }
             else {
-                warn "unknown validator for $key, ignoring."
+                warn "unknown validator for $key, ignoring.";
+                next;
             }
+
+            my ($ok, $res) = $code->($request_args{$key});
+            push @results, "$key: $res" unless $ok;
         }
     }
 

commit 1899596969ad6ff9fe3795a196620df67b8472dc
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Thu Apr 9 08:40:07 2009 +0000

    has_value validator

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index d3d80ce..0d72405 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -82,4 +82,10 @@ sub email_is_privileged {
     return (0, "Invalid account: $email");
 }
 
+sub has_value {
+    my $value = shift;
+    return 1 if defined($value) && length($value) > 0;
+    return (0, "You must provide a value for this field");
+}
+
 1;

commit efa2fcaea968d665e477b82d36a7a6212fe2fb65
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Thu Apr 9 08:59:03 2009 +0000

    Variable name fix

diff --git a/html/FormTools/Form b/html/FormTools/Form
index eb7cbf6..bee3673 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -31,7 +31,7 @@ if ($validation && $real_next) {
                 next;
             }
 
-            my ($ok, $res) = $code->($request_args{$key});
+            my ($ok, $res) = $validator->($request_args{$key});
             push @results, "$key: $res" unless $ok;
         }
     }

commit 6657b37da863eb9111eb9383e0af62a3f7611f1d
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 16:16:24 2009 +0000

    Pass in all arguments to the validator so we can validate multiple arguments together

diff --git a/html/FormTools/Form b/html/FormTools/Form
index bee3673..db8db50 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -31,7 +31,7 @@ if ($validation && $real_next) {
                 next;
             }
 
-            my ($ok, $res) = $validator->($request_args{$key});
+            my ($ok, $res) = $validator->($request_args{$key}, \%request_args);
             push @results, "$key: $res" unless $ok;
         }
     }

commit 57790c1688b6256af9137d030d658aacb6251616
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 16:16:43 2009 +0000

    Ability to specify number of rows on a field

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 239124d..193fafe 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -5,6 +5,7 @@ $item_labels => {}
 $render_as => 'normal'
 $default => undef
 $cols => undef
+$rows => undef
 $empty_allowed => 1
 $show_validation => 0
 </%args>
@@ -95,10 +96,10 @@ unless ( $default ) {
 
 % if ($render_as eq 'normal') {
     <& /Elements/EditCustomField, Object => $queue, CustomField => $cf, NamePrefix => $NamePrefix, 
-            ($cf->Type =~ /text/i) ? (Rows => 6, Cols => $cols ||60) : (),
-            ($cf->Type =~ /freeform/i) ? (Rows => 6, Cols => $cols ||30) : (),
+            ($cf->Type =~ /text/i) ? (Cols => $cols ||60) : (),
+            ($cf->Type =~ /freeform/i) ? (Cols => $cols ||30) : (),
+            Rows => $rows || 6,
             ($default ? (Default => $default) : ())
-            
             &>
 % if ($show_validation && $cf->FriendlyPattern) {
     <% loc("Input must match [_1]", $cf->FriendlyPattern) %>

commit 32330a28426c52cf4542274ca1fdcd6298f2e2b9
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 16:16:48 2009 +0000

    Instead of hardcoding caller, allow the user to pass in the real URL for validation so that Form works inside a wrapper

diff --git a/html/FormTools/Form b/html/FormTools/Form
index db8db50..bc36c21 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -1,5 +1,6 @@
 <%args>
 $next
+$next_for_validation => undef
 $include_header => 1
 $validation => 0
 </%args>
@@ -68,6 +69,8 @@ foreach my $key (keys %request_args) {
    delete $request_args{$key} if ($core_fields{$key});
 }
 
+$next_for_validation ||= $m->caller(1)->path;
+
 </%init>
 % if ($include_header) {
 <& /Elements/Header, Title => $m->notes('page_title') &>
@@ -76,7 +79,7 @@ foreach my $key (keys %request_args) {
 
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="POST" action="<% $validation ? $m->caller(1)->path : $next %>" enctype="multipart/form-data">
+<form method="POST" action="<% $validation ? $next_for_validation : $next %>" enctype="multipart/form-data">
 % if ($validation) {
 <input type="hidden" name="_form_tools_next" value="<%$next%>" />
 % }

commit a1ed3c634c39ab1b3bbbb3191ed970d52ca97f0d
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 17:26:51 2009 +0000

    Wrap readonly values in <span class="readonly">

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 193fafe..8886cbd 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -83,7 +83,7 @@ unless ( $default ) {
 
 % } elsif ($render_as eq 'readonly') {
 
-<% $default %>
+<span class="readonly"><% $default %></span>
 
 % } else {
 

commit 3f8d6d6878804fa4bad8cf4b30970e8742256340
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 17:26:53 2009 +0000

    Wrap readonly CFs too

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 8886cbd..ad7cfd4 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -160,7 +160,7 @@ unless ( $default ) {
                          ($default ? (Default => $default) : ()) &>
 
 % } elsif ($render_as eq 'readonly') {
-    <% $default %>
+    <span class="readonly"><% $default %></span>
 % } else {
 % die "'$render_as' isn't a valid rendering option for field '$name'";
 %}

commit 10fa758111a70511ef878c825f344bd2c7066d1d
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Apr 10 18:07:36 2009 +0000

    * fix a mismerge that makes the code not compile

diff --git a/html/FormTools/Field b/html/FormTools/Field
index ad7cfd4..efd6bb5 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -13,9 +13,6 @@ $show_validation => 0
 use RT::Extension::FormTools;
 my $queue      = $m->notes('queue');
 my $ticket     = $m->notes('ticket');
-if ($ticket && $ticket->Id) {
-    $NamePrefix = "Object-RT::Ticket-".$ticket->Id."-CustomField-";
-}
 my $field_type = 'custom';
 my $field_label ||= $label;
 my $cf;

commit ff152347c2fa84e8baef878d7eaeaa6d23d31ead
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Apr 10 20:55:14 2009 +0000

    * bump version, we've certainly churned it a lot

diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index e6758c9..5121fe4 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -30,7 +30,11 @@ BEGIN {
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.70';
+	$VERSION = '0.78';
+
+	*inc::Module::Install::VERSION = *VERSION;
+	@inc::Module::Install::ISA     = __PACKAGE__;
+
 }
 
 
@@ -81,7 +85,7 @@ END_DIE
 
 # Build.PL was formerly supported, but no longer is due to excessive
 # difficulty in implementing every single feature twice.
-if ( $0 =~ /Build.PL$/i or -f 'Build.PL' ) { die <<"END_DIE" }
+if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
 
 Module::Install no longer supports Build.PL.
 
@@ -95,14 +99,20 @@ END_DIE
 
 
 
+# To save some more typing in Module::Install installers, every...
+# use inc::Module::Install
+# ...also acts as an implicit use strict.
+$^H |= strict::bits(qw(refs subs vars));
+
+
+
+
+
 use Cwd        ();
 use File::Find ();
 use File::Path ();
 use FindBin;
 
-*inc::Module::Install::VERSION = *VERSION;
- at inc::Module::Install::ISA     = __PACKAGE__;
-
 sub autoload {
 	my $self = shift;
 	my $who  = $self->_caller;
@@ -115,8 +125,10 @@ sub autoload {
 			goto &$code unless $cwd eq $pwd;
 		}
 		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-		unshift @_, ( $self, $1 );
-		goto &{$self->can('call')} unless uc($1) eq $1;
+		unless ( uc($1) eq $1 ) {
+			unshift @_, ( $self, $1 );
+			goto &{$self->can('call')};
+		}
 	};
 }
 
@@ -145,8 +157,7 @@ sub import {
 }
 
 sub preload {
-	my ($self) = @_;
-
+	my $self = shift;
 	unless ( $self->{extensions} ) {
 		$self->load_extensions(
 			"$self->{prefix}/$self->{path}", $self
@@ -202,6 +213,7 @@ sub new {
 		$args{path}  =~ s!::!/!g;
 	}
 	$args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
+	$args{wrote}      = 0;
 
 	bless( \%args, $class );
 }
@@ -238,7 +250,7 @@ END_DIE
 sub load_extensions {
 	my ($self, $path, $top) = @_;
 
-	unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+	unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
 		unshift @INC, $self->{prefix};
 	}
 
@@ -277,9 +289,9 @@ sub find_extensions {
 		# correctly.  Otherwise, root through the file to locate the case-preserved
 		# version of the package name.
 		if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
-			open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
-			my $in_pod = 0;
-			while ( <PKGFILE> ) {
+			my $content = Module::Install::_read($subpath . '.pm');
+			my $in_pod  = 0;
+			foreach ( split //, $content ) {
 				$in_pod = 1 if /^=\w/;
 				$in_pod = 0 if /^=cut/;
 				next if ($in_pod || /^=cut/);  # skip pod text
@@ -289,7 +301,6 @@ sub find_extensions {
 					last;
 				}
 			}
-			close PKGFILE;
 		}
 
 		push @found, [ $file, $pkg ];
@@ -298,6 +309,13 @@ sub find_extensions {
 	@found;
 }
 
+
+
+
+
+#####################################################################
+# Utility Functions
+
 sub _caller {
 	my $depth = 0;
 	my $call  = caller($depth);
@@ -308,6 +326,44 @@ sub _caller {
 	return $call;
 }
 
+sub _read {
+	local *FH;
+	open FH, "< $_[0]" or die "open($_[0]): $!";
+	my $str = do { local $/; <FH> };
+	close FH or die "close($_[0]): $!";
+	return $str;
+}
+
+sub _write {
+	local *FH;
+	open FH, "> $_[0]" or die "open($_[0]): $!";
+	foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!" }
+	close FH or die "close($_[0]): $!";
+}
+
+# _version is for processing module versions (eg, 1.03_05) not
+# Perl versions (eg, 5.8.1).
+
+sub _version ($) {
+	my $s = shift || 0;
+	   $s =~ s/^(\d+)\.?//;
+	my $l = $1 || 0;
+	my @v = map { $_ . '0' x (3 - length $_) } $s =~ /(\d{1,3})\D?/g;
+	   $l = $l . '.' . join '', @v if @v;
+	return $l + 0;
+}
+
+# Cloned from Params::Util::_CLASS
+sub _CLASS ($) {
+	(
+		defined $_[0]
+		and
+		! ref $_[0]
+		and
+		$_[0] =~ m/^[^\W\d]\w*(?:::\w+)*$/s
+	) ? $_[0] : undef;
+}
+
 1;
 
-# Copyright 2008 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 5e24ae1..2056605 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.70';
+$VERSION = '0.78';
 
 # Suspend handler for "redefined" warnings
 BEGIN {
@@ -45,6 +45,8 @@ sub admin {
     $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
 }
 
+#line 101
+
 sub is_admin {
     $_[0]->admin->VERSION;
 }
@@ -67,4 +69,4 @@ BEGIN {
 
 1;
 
-#line 138
+#line 146
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 9ce21a4..fb6ba28 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -11,7 +11,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.70';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -39,6 +39,7 @@ sub can_run {
 	return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
 
 	for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+		next if $dir eq '';
 		my $abs = File::Spec->catfile($dir, $_[1]);
 		return $abs if (-x $abs or $abs = MM->maybe_command($abs));
 	}
@@ -79,4 +80,4 @@ if ( $^O eq 'cygwin' ) {
 
 __END__
 
-#line 157
+#line 158
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 2b8f6e8..266631b 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,20 +6,20 @@ use Module::Install::Base;
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.70';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 sub get_file {
     my ($self, %args) = @_;
-    my ($scheme, $host, $path, $file) = 
+    my ($scheme, $host, $path, $file) =
         $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
 
     if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
         $args{url} = $args{ftp_url}
             or (warn("LWP support unavailable!\n"), return);
-        ($scheme, $host, $path, $file) = 
+        ($scheme, $host, $path, $file) =
             $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
     }
 
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 27bbace..40483f8 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -7,7 +7,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.70';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -36,9 +36,9 @@ sub prompt {
 
 sub makemaker_args {
 	my $self = shift;
-	my $args = ($self->{makemaker_args} ||= {});
-	  %$args = ( %$args, @_ ) if @_;
-	$args;
+	my $args = ( $self->{makemaker_args} ||= {} );
+	%$args = ( %$args, @_ );
+	return $args;
 }
 
 # For mm args that take multiple space-seperated args,
@@ -63,18 +63,18 @@ sub build_subdirs {
 sub clean_files {
 	my $self  = shift;
 	my $clean = $self->makemaker_args->{clean} ||= {};
-	%$clean = (
-		%$clean, 
-		FILES => join(' ', grep length, $clean->{FILES}, @_),
+	  %$clean = (
+		%$clean,
+		FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
 	);
 }
 
 sub realclean_files {
-	my $self  = shift;
+	my $self      = shift;
 	my $realclean = $self->makemaker_args->{realclean} ||= {};
-	%$realclean = (
-		%$realclean, 
-		FILES => join(' ', grep length, $realclean->{FILES}, @_),
+	  %$realclean = (
+		%$realclean,
+		FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
 	);
 }
 
@@ -116,13 +116,19 @@ sub write {
 
 	# Make sure we have a new enough
 	require ExtUtils::MakeMaker;
-	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION );
 
-	# Generate the 
+	# MakeMaker can complain about module versions that include
+	# an underscore, even though its own version may contain one!
+	# Hence the funny regexp to get rid of it.  See RT #35800
+	# for details.
+
+	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+
+	# Generate the
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
-	$args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
-	$args->{VERSION}  = $self->version || $self->determine_VERSION($args);
+	$args->{NAME}     = $self->module_name || $self->name;
+	$args->{VERSION}  = $self->version;
 	$args->{NAME}     =~ s/-/::/g;
 	if ( $self->tests ) {
 		$args->{test} = { TESTS => $self->tests };
@@ -175,7 +181,9 @@ sub write {
 
 	my $user_preop = delete $args{dist}->{PREOP};
 	if (my $preop = $self->admin->preop($user_preop)) {
-		$args{dist} = $preop;
+		foreach my $key ( keys %$preop ) {
+			$args{dist}->{$key} = $preop->{$key};
+		}
 	}
 
 	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
@@ -188,7 +196,7 @@ sub fix_up_makefile {
 	my $top_class     = ref($self->_top) || '';
 	my $top_version   = $self->_top->VERSION || '';
 
-	my $preamble = $self->preamble 
+	my $preamble = $self->preamble
 		? "# Preamble by $top_class $top_version\n"
 			. $self->preamble
 		: '';
@@ -242,4 +250,4 @@ sub postamble {
 
 __END__
 
-#line 371
+#line 379
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index a39ffde..ef1acd1 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,25 +6,43 @@ use Module::Install::Base;
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.70';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 my @scalar_keys = qw{
-	name module_name abstract author version license
-	distribution_type perl_version tests installdirs
+	name
+	module_name
+	abstract
+	author
+	version
+	distribution_type
+	tests
+	installdirs
 };
 
 my @tuple_keys = qw{
-	configure_requires build_requires requires recommends bundles
+	configure_requires
+	build_requires
+	requires
+	recommends
+	bundles
+	resources
 };
 
-sub Meta            { shift        }
-sub Meta_ScalarKeys { @scalar_keys }
-sub Meta_TupleKeys  { @tuple_keys  }
+my @resource_keys = qw{
+	homepage
+	bugtracker
+	repository
+};
+
+sub Meta              { shift          }
+sub Meta_ScalarKeys   { @scalar_keys   }
+sub Meta_TupleKeys    { @tuple_keys    }
+sub Meta_ResourceKeys { @resource_keys }
 
-foreach my $key (@scalar_keys) {
+foreach my $key ( @scalar_keys ) {
 	*$key = sub {
 		my $self = shift;
 		return $self->{values}{$key} if defined wantarray and !@_;
@@ -33,33 +51,100 @@ foreach my $key (@scalar_keys) {
 	};
 }
 
-foreach my $key (@tuple_keys) {
+foreach my $key ( @resource_keys ) {
 	*$key = sub {
 		my $self = shift;
-		return $self->{values}{$key} unless @_;
-
-		my @rv;
-		while (@_) {
-			my $module = shift or last;
-			my $version = shift || 0;
-			if ( $module eq 'perl' ) {
-				$version =~ s{^(\d+)\.(\d+)\.(\d+)}
-				             {$1 + $2/1_000 + $3/1_000_000}e;
-				$self->perl_version($version);
-				next;
-			}
-			my $rv = [ $module, $version ];
-			push @rv, $rv;
+		unless ( @_ ) {
+			return () unless $self->{values}{resources};
+			return map  { $_->[1] }
+			       grep { $_->[0] eq $key }
+			       @{ $self->{values}{resources} };
 		}
-		push @{ $self->{values}{$key} }, @rv;
-		@rv;
+		return $self->{values}{resources}{$key} unless @_;
+		my $uri = shift or die(
+			"Did not provide a value to $key()"
+		);
+		$self->resources( $key => $uri );
+		return 1;
 	};
 }
 
+sub requires {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{requires} }, [ $module, $version ];
+	}
+	$self->{values}{requires};
+}
+
+sub build_requires {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{build_requires} }, [ $module, $version ];
+	}
+	$self->{values}{build_requires};
+}
+
+sub configure_requires {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{configure_requires} }, [ $module, $version ];
+	}
+	$self->{values}{configure_requires};
+}
+
+sub recommends {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{recommends} }, [ $module, $version ];
+	}
+	$self->{values}{recommends};
+}
+
+sub bundles {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{bundles} }, [ $module, $version ];
+	}
+	$self->{values}{bundles};
+}
+
+# Resource handling
+my %lc_resource = map { $_ => 1 } qw{
+	homepage
+	license
+	bugtracker
+	repository
+};
+
+sub resources {
+	my $self = shift;
+	while ( @_ ) {
+		my $name  = shift or last;
+		my $value = shift or next;
+		if ( $name eq lc $name and ! $lc_resource{$name} ) {
+			die("Unsupported reserved lowercase resource '$name'");
+		}
+		$self->{values}{resources} ||= [];
+		push @{ $self->{values}{resources} }, [ $name, $value ];
+	}
+	$self->{values}{resources};
+}
+
 # Aliases for build_requires that will have alternative
 # meanings in some future version of META.yml.
-sub test_requires      { shift->build_requires(@_)  }
-sub install_requires   { shift->build_requires(@_)  }
+sub test_requires      { shift->build_requires(@_) }
+sub install_requires   { shift->build_requires(@_) }
 
 # Aliases for installdirs options
 sub install_as_core    { $_[0]->installdirs('perl')   }
@@ -69,45 +154,91 @@ sub install_as_vendor  { $_[0]->installdirs('vendor') }
 
 sub sign {
 	my $self = shift;
-	return $self->{'values'}{'sign'} if defined wantarray and ! @_;
-	$self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
+	return $self->{values}{sign} if defined wantarray and ! @_;
+	$self->{values}{sign} = ( @_ ? $_[0] : 1 );
 	return $self;
 }
 
 sub dynamic_config {
 	my $self = shift;
 	unless ( @_ ) {
-		warn "You MUST provide an explicit true/false value to dynamic_config, skipping\n";
+		warn "You MUST provide an explicit true/false value to dynamic_config\n";
 		return $self;
 	}
-	$self->{'values'}{'dynamic_config'} = $_[0] ? 1 : 0;
-	return $self;
+	$self->{values}{dynamic_config} = $_[0] ? 1 : 0;
+	return 1;
+}
+
+sub perl_version {
+	my $self = shift;
+	return $self->{values}{perl_version} unless @_;
+	my $version = shift or die(
+		"Did not provide a value to perl_version()"
+	);
+
+	# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+	# numbers (eg, 5.006001 or 5.008009).
+	# Also, convert double-part versions (eg, 5.8)
+
+	$version =~ s/^(\d+)\.(\d+)(?:\.(\d+))?$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+
+	$version =~ s/_.+$//;
+	$version = $version + 0; # Numify
+	unless ( $version >= 5.005 ) {
+		die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
+	}
+	$self->{values}{perl_version} = $version;
+	return 1;
+}
+
+sub license {
+	my $self = shift;
+	return $self->{values}{license} unless @_;
+	my $license = shift or die(
+		'Did not provide a value to license()'
+	);
+	$self->{values}{license} = $license;
+
+	# Automatically fill in license URLs
+	if ( $license eq 'perl' ) {
+		$self->resources( license => 'http://dev.perl.org/licenses/' );
+	}
+
+	return 1;
 }
 
 sub all_from {
 	my ( $self, $file ) = @_;
 
 	unless ( defined($file) ) {
-		my $name = $self->name
-			or die "all_from called with no args without setting name() first";
+		my $name = $self->name or die(
+			"all_from called with no args without setting name() first"
+		);
 		$file = join('/', 'lib', split(/-/, $name)) . '.pm';
 		$file =~ s{.*/}{} unless -e $file;
-		die "all_from: cannot find $file from $name" unless -e $file;
+		unless ( -e $file ) {
+			die("all_from cannot find $file from $name");
+		}
+	}
+	unless ( -f $file ) {
+		die("The path '$file' does not exist, or is not a file");
 	}
 
+	# Some methods pull from POD instead of code.
+	# If there is a matching .pod, use that instead
+	my $pod = $file;
+	$pod =~ s/\.pm$/.pod/i;
+	$pod = $file unless -e $pod;
+
+	# Pull the different values
+	$self->name_from($file)         unless $self->name;
 	$self->version_from($file)      unless $self->version;
 	$self->perl_version_from($file) unless $self->perl_version;
+	$self->author_from($pod)        unless $self->author;
+	$self->license_from($pod)       unless $self->license;
+	$self->abstract_from($pod)      unless $self->abstract;
 
-	# The remaining probes read from POD sections; if the file
-	# has an accompanying .pod, use that instead
-	my $pod = $file;
-	if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
-		$file = $pod;
-	}
-
-	$self->author_from($file)   unless $self->author;
-	$self->license_from($file)  unless $self->license;
-	$self->abstract_from($file) unless $self->abstract;
+	return 1;
 }
 
 sub provides {
@@ -169,8 +300,8 @@ sub features {
 	while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
 		$self->feature( $name, @$mods );
 	}
-	return $self->{values}->{features}
-		? @{ $self->{values}->{features} }
+	return $self->{values}{features}
+		? @{ $self->{values}{features} }
 		: ();
 }
 
@@ -183,10 +314,10 @@ sub no_index {
 
 sub read {
 	my $self = shift;
-	$self->include_deps( 'YAML', 0 );
+	$self->include_deps( 'YAML::Tiny', 0 );
 
-	require YAML;
-	my $data = YAML::LoadFile('META.yml');
+	require YAML::Tiny;
+	my $data = YAML::Tiny::LoadFile('META.yml');
 
 	# Call methods explicitly in case user has already set some values.
 	while ( my ( $key, $value ) = each %$data ) {
@@ -226,35 +357,51 @@ sub abstract_from {
 	 );
 }
 
-sub _slurp {
-	local *FH;
-	open FH, "< $_[1]" or die "Cannot open $_[1].pod: $!";
-	do { local $/; <FH> };
+# Add both distribution and module name
+sub name_from {
+	my ($self, $file) = @_;
+	if (
+		Module::Install::_read($file) =~ m/
+		^ \s*
+		package \s*
+		([\w:]+)
+		\s* ;
+		/ixms
+	) {
+		my ($name, $module_name) = ($1, $1);
+		$name =~ s{::}{-}g;
+		$self->name($name);
+		unless ( $self->module_name ) {
+			$self->module_name($module_name);
+		}
+	} else {
+		die("Cannot determine name from $file\n");
+	}
 }
 
 sub perl_version_from {
-	my ( $self, $file ) = @_;
+	my $self = shift;
 	if (
-		$self->_slurp($file) =~ m/
+		Module::Install::_read($_[0]) =~ m/
 		^
-		use \s*
+		(?:use|require) \s*
 		v?
 		([\d_\.]+)
 		\s* ;
 		/ixms
 	) {
-		my $v = $1;
-		$v =~ s{_}{}g;
-		$self->perl_version($1);
+		my $perl_version = $1;
+		$perl_version =~ s{_}{}g;
+		$self->perl_version($perl_version);
 	} else {
-		warn "Cannot determine perl version info from $file\n";
+		warn "Cannot determine perl version info from $_[0]\n";
 		return;
 	}
 }
 
 sub author_from {
-	my ( $self, $file ) = @_;
-	my $content = $self->_slurp($file);
+	my $self    = shift;
+	my $content = Module::Install::_read($_[0]);
 	if ($content =~ m/
 		=head \d \s+ (?:authors?)\b \s*
 		([^\n]*)
@@ -268,15 +415,14 @@ sub author_from {
 		$author =~ s{E<gt>}{>}g;
 		$self->author($author);
 	} else {
-		warn "Cannot determine author info from $file\n";
+		warn "Cannot determine author info from $_[0]\n";
 	}
 }
 
 sub license_from {
-	my ( $self, $file ) = @_;
-
+	my $self = shift;
 	if (
-		$self->_slurp($file) =~ m/
+		Module::Install::_read($_[0]) =~ m/
 		(
 			=head \d \s+
 			(?:licen[cs]e|licensing|copyright|legal)\b
@@ -288,8 +434,12 @@ sub license_from {
 		my $license_text = $1;
 		my @phrases      = (
 			'under the same (?:terms|license) as perl itself' => 'perl',        1,
+			'GNU general public license'                      => 'gpl',         1,
 			'GNU public license'                              => 'gpl',         1,
+			'GNU lesser general public license'               => 'lgpl',        1,
 			'GNU lesser public license'                       => 'lgpl',        1,
+			'GNU library general public license'              => 'lgpl',        1,
+			'GNU library public license'                      => 'lgpl',        1,
 			'BSD license'                                     => 'bsd',         1,
 			'Artistic license'                                => 'artistic',    1,
 			'GPL'                                             => 'gpl',         1,
@@ -302,17 +452,32 @@ sub license_from {
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 			$pattern =~ s{\s+}{\\s+}g;
 			if ( $license_text =~ /\b$pattern\b/i ) {
-				if ( $osi and $license_text =~ /All rights reserved/i ) {
-					warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
-				}
 				$self->license($license);
 				return 1;
 			}
 		}
 	}
 
-	warn "Cannot determine license info from $file\n";
+	warn "Cannot determine license info from $_[0]\n";
 	return 'unknown';
 }
 
+sub bugtracker_from {
+	my $self    = shift;
+	my $content = Module::Install::_read($_[0]);
+	my @links   = $content =~ m/L\<(http\:\/\/rt\.cpan\.org\/[^>]+)\>/g;
+	unless ( @links ) {
+		warn "Cannot determine bugtracker info from $_[0]\n";
+		return 0;
+	}
+	if ( @links > 1 ) {
+		warn "Found more than on rt.cpan.org link in $_[0]\n";
+		return 0;
+	}
+
+	# Set the bugtracker
+	bugtracker( $links[0] );
+	return 1;
+}
+
 1;
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 80a8b5c..20a354b 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,12 +8,15 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.23';
+our $VERSION = '0.24';
 
 use FindBin;
 use File::Glob     ();
 use File::Basename ();
 
+my @DIRS = qw(etc lib html bin sbin po var);
+my @INDEX_DIRS = qw(lib bin sbin);
+
 sub RTx {
     my ( $self, $name ) = @_;
 
@@ -60,8 +63,8 @@ sub RTx {
     $RT::LocalVarPath  ||= $RT::VarPath;
     $RT::LocalPoPath   ||= $RT::LocalLexiconPath;
     $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
+    $RT::LocalLibPath  ||= "$RT::LocalPath/lib";
 
-    my %path;
     my $with_subdirs = $ENV{WITH_SUBDIRS};
     @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
         @ARGV;
@@ -69,36 +72,40 @@ sub RTx {
     my %subdirs;
     %subdirs = map { $_ => 1 } split( /\s*,\s*/, $with_subdirs )
         if defined $with_subdirs;
-
-    foreach (qw(bin etc html po sbin var)) {
-        next unless -d "$FindBin::Bin/$_";
-        next if keys %subdirs and !$subdirs{$_};
-        $self->no_index( directory => $_ );
-
-        no strict 'refs';
-        my $varname = "RT::Local" . ucfirst($_) . "Path";
-        $path{$_} = ${$varname} || "$RT::LocalPath/$_";
+    unless ( keys %subdirs ) {
+        $subdirs{$_} = 1 foreach grep -d "$FindBin::Bin/$_", @DIRS;
     }
 
-    $path{$_} .= "/$name" for grep $path{$_}, qw(etc po var);
-    $path{lib} = "$RT::LocalPath/lib" unless keys %subdirs and !$subdirs{'lib'};
-
     # If we're running on RT 3.8 with plugin support, we really wany
     # to install libs, mason templates and po files into plugin specific
     # directories
-    if ($RT::LocalPluginPath) {
-        foreach my $path (qw(lib po html etc bin sbin)) {
-            next unless -d "$FindBin::Bin/$path";
-            next if %subdirs and !$subdirs{$path};
-            $path{$path} = $RT::LocalPluginPath . "/$original_name/$path";
+    my %path;
+    if ( $RT::LocalPluginPath ) {
+        die "Because of bugs in RT 3.8.0 this extension can not be installed.\n"
+            ."Upgrade to RT 3.8.1 or newer.\n" if $RT::VERSION =~ /^3\.8\.0/;
+        $path{$_} = $RT::LocalPluginPath . "/$original_name/$_"
+            foreach @DIRS;
+    } else {
+        foreach ( @DIRS ) {
+            no strict 'refs';
+            my $varname = "RT::Local" . ucfirst($_) . "Path";
+            $path{$_} = ${$varname} || "$RT::LocalPath/$_";
         }
+
+        $path{$_} .= "/$name" for grep $path{$_}, qw(etc po var);
     }
 
-    my $args = join( ', ', map "q($_)", %path );
-    print "./$_\t=> $path{$_}\n" for sort keys %path;
+    my %index = map { $_ => 1 } @INDEX_DIRS;
+    $self->no_index( directory => $_ ) foreach grep !$index{$_}, @DIRS;
+
+    my $args = join ', ', map "q($_)", map { ($_, $path{$_}) }
+        grep $subdirs{$_}, keys %path;
 
-    if ( my @dirs = map { ( -D => $_ ) } grep $path{$_}, qw(bin html sbin) ) {
-        my @po = map { ( -o => $_ ) } grep -f,
+    print "./$_\t=> $path{$_}\n" for sort keys %subdirs;
+
+    if ( my @dirs = map { ( -D => $_ ) } grep $subdirs{$_}, qw(bin html sbin) ) {
+        my @po = map { ( -o => $_ ) }
+            grep -f,
             File::Glob::bsd_glob("po/*.po");
         $self->postamble(<< ".") if @po;
 lexicons ::
@@ -111,7 +118,7 @@ install ::
 \t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
 .
 
-    if ( $path{var} and -d $RT::MasonDataDir ) {
+    if ( $subdirs{var} and -d $RT::MasonDataDir ) {
         my ( $uid, $gid ) = ( stat($RT::MasonDataDir) )[ 4, 5 ];
         $postamble .= << ".";
 \t\$(NOECHO) chown -R $uid:$gid $path{var}
@@ -139,16 +146,17 @@ dropdb ::
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
 
     $self->postamble("$postamble\n");
-    if ( %subdirs and !$subdirs{'lib'} ) {
+    unless ( $subdirs{'lib'} ) {
         $self->makemaker_args( PM => { "" => "" }, );
     } else {
-        $self->makemaker_args( INSTALLSITELIB => "$RT::LocalPath/lib" );
+        $self->makemaker_args( INSTALLSITELIB => $path{'lib'} );
+        $self->makemaker_args( INSTALLARCHLIB => $path{'lib'} );
     }
 
-        $self->makemaker_args( INSTALLSITEMAN1DIR => "$RT::LocalPath/man/man1" );
-        $self->makemaker_args( INSTALLSITEMAN3DIR => "$RT::LocalPath/man/man3" );
-        $self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
-        $self->makemaker_args( INSTALLARCHLIB => "$RT::LocalPath/lib" );
+    $self->makemaker_args( INSTALLSITEMAN1DIR => "$RT::LocalPath/man/man1" );
+    $self->makemaker_args( INSTALLSITEMAN3DIR => "$RT::LocalPath/man/man3" );
+    $self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
+
     if (%has_etc) {
         $self->load('RTxInitDB');
         print "For first-time installation, type 'make initdb'.\n";
@@ -180,4 +188,4 @@ sub RTxInit {
 
 __END__
 
-#line 281
+#line 302
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index 21a81ab..9617b35 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.70';
+	$VERSION = '0.78';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index a05592d..b7a591f 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.70';
+	$VERSION = '0.78';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 0d72405..d887bd0 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::FormTools;
 
-our $VERSION = '0.05';
+our $VERSION = '0.06_01';
 
 =head2 is_core_field
 

commit b938b7fcb2a20ca1c833568095a1bea5c1eb58c5
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 22:23:04 2009 +0000

    Wrap radio labels with a .radio-label span

diff --git a/html/FormTools/Field b/html/FormTools/Field
index efd6bb5..c2d9123 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -106,7 +106,7 @@ unless ( $default ) {
 %       my $selected = 0;
 %       my $id = $NamePrefix . $cf->Id;
 % if ($empty_allowed) {
-        <input type="radio" name="<%$id%>-Values" value="" <% !$default ?  'CHECKED' : '' %>><&|/l&>(no value)</&>
+        <input type="radio" name="<%$id%>-Values" value="" <% !$default ?  'CHECKED' : '' %>><span class="radio-label"><&|/l&>(no value)</&></span>
 %        if ($render_as =~ /vertical/) { 
             <br/>
 %        }
@@ -122,7 +122,7 @@ unless ( $default ) {
             <% ($default eq $value->Name) ? 'CHECKED' : '' %>
 %       }
 % }
-            ><% $value->Name%> 
+            ><span class="radio-label"><% $value->Name%></span>
 
 %        if ($render_as =~ /vertical/) { 
             <br/>

commit 0f5b7626e41eb5a2d402ea841659b28db75073a7
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 22:23:07 2009 +0000

    Respect rows and cols for messageboxes

diff --git a/html/FormTools/Field b/html/FormTools/Field
index c2d9123..9ab123f 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -59,7 +59,12 @@ unless ( $default ) {
 
 % if ($field_type eq 'core' && $name eq 'Content') {
 
-<& /Elements/MessageBox, Name => $name, IncludeSignature => 0 &>
+<& /Elements/MessageBox,
+    Name => $name,
+    ($rows ? (Rows => $rows) : ()),
+    ($cols ? (Cols => $cols) : ()),
+    IncludeSignature => 0,
+&>
 
 % } else {
 

commit f2429d89497e129ee40b0cfc47700cb2fa2a90a3
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 22:30:07 2009 +0000

    MessageBox takes Height and Width not Rows and Cols

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 9ab123f..ef33bde 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -61,8 +61,8 @@ unless ( $default ) {
 
 <& /Elements/MessageBox,
     Name => $name,
-    ($rows ? (Rows => $rows) : ()),
-    ($cols ? (Cols => $cols) : ()),
+    ($rows ? (Height => $rows) : ()),
+    ($cols ? (Width => $cols) : ()),
     IncludeSignature => 0,
 &>
 

commit 9b4b4c9da3c8e1de505f604adcb0246cc4f5fff8
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Fri Apr 10 22:40:48 2009 +0000

    Handle readonly multi-value fields

diff --git a/html/FormTools/Field b/html/FormTools/Field
index ef33bde..38c380c 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -17,6 +17,8 @@ my $field_type = 'custom';
 my $field_label ||= $label;
 my $cf;
 
+my @values;
+
 $queue = $ticket->QueueObj
     if !$queue && $ticket;
 
@@ -41,7 +43,11 @@ if ( RT::Extension::FormTools::is_core_field($name) ) {
 
     $m->notes( cfs_on_page => [ @{$m->notes('cfs_on_page')||[]}, $cf->id ] );
     $field_label ||= $cf->Name;
-    $default ||= $ticket->FirstCustomFieldValue($name) if $ticket;
+
+    if ($ticket) {
+        @values = map { $_->Content } @{ $cf->ValuesForObject($ticket)->ItemsArrayRef };
+        $default ||= $values[0];
+    }
 }
 
 
@@ -85,7 +91,15 @@ unless ( $default ) {
 
 % } elsif ($render_as eq 'readonly') {
 
-<span class="readonly"><% $default %></span>
+% if (@values > 1) {
+    <ul>
+% for (@values) {
+    <li class="readonly"><% $_ %></span>
+% }
+    </ul>
+% } else {
+    <span class="readonly"><% $default %></span>
+% }
 
 % } else {
 
@@ -162,7 +176,17 @@ unless ( $default ) {
                          ($default ? (Default => $default) : ()) &>
 
 % } elsif ($render_as eq 'readonly') {
+
+% if (@values > 1) {
+    <ul>
+% for (@values) {
+    <li class="readonly"><% $_ %></span>
+% }
+    </ul>
+% } else {
     <span class="readonly"><% $default %></span>
+% }
+
 % } else {
 % die "'$render_as' isn't a valid rendering option for field '$name'";
 %}

commit c1cd0d89de078d18785a022594f0a0f811e75866
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Sat Apr 11 18:35:47 2009 +0000

    include_page_layout argument

diff --git a/html/FormTools/Form b/html/FormTools/Form
index bc36c21..303b2ad 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -2,6 +2,7 @@
 $next
 $next_for_validation => undef
 $include_header => 1
+$include_page_layout => 1
 $validation => 0
 </%args>
 <%init>
@@ -74,8 +75,10 @@ $next_for_validation ||= $m->caller(1)->path;
 </%init>
 % if ($include_header) {
 <& /Elements/Header, Title => $m->notes('page_title') &>
+% if ($include_page_layout) {
 <& /Elements/PageLayout, title => $m->notes('page_title') &>
 % }
+% }
 
 <& /Elements/ListActions, actions => \@results &>
 

commit 9e98e8f2a419df653572e1a8a8d3aa2293b0322c
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Sat Apr 11 18:37:00 2009 +0000

    Pass the ShowBar argument to Header

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 303b2ad..dc839a0 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -3,6 +3,7 @@ $next
 $next_for_validation => undef
 $include_header => 1
 $include_page_layout => 1
+$ShowBar => 1
 $validation => 0
 </%args>
 <%init>
@@ -74,7 +75,7 @@ $next_for_validation ||= $m->caller(1)->path;
 
 </%init>
 % if ($include_header) {
-<& /Elements/Header, Title => $m->notes('page_title') &>
+<& /Elements/Header, Title => $m->notes('page_title'), ShowBar => $ShowBar &>
 % if ($include_page_layout) {
 <& /Elements/PageLayout, title => $m->notes('page_title') &>
 % }

commit cfcc2ff5fcab61dae2d3ab38799b6c4af6401b99
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Mon Apr 13 23:19:58 2009 +0000

    Add a forbid_persisting hash

diff --git a/html/FormTools/Form b/html/FormTools/Form
index dc839a0..e048e68 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -5,6 +5,7 @@ $include_header => 1
 $include_page_layout => 1
 $ShowBar => 1
 $validation => 0
+$forbid_persisting => {}
 </%args>
 <%init>
 use RT::Extension::FormTools;
@@ -95,7 +96,7 @@ $next_for_validation ||= $m->caller(1)->path;
 % foreach my $key (keys %request_args) {
 % next if (ref $request_args{$key} && ref $request_args{$key} ne 'ARRAY');
 % foreach my $val ( ref ($request_args{$key}) ? @{$request_args{$key}} : ($request_args{$key})) {
-
+% next if $forbid_persisting{$key};
 <input type="hidden" name="<%$key%>" value="<%$val%>" />
 % }
 % }

commit 0adcf845ff9ca08ab7cc8f06003d9ee837ccf633
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Apr 14 20:09:43 2009 +0000

    forbid_persisting is a hashref not a hash

diff --git a/html/FormTools/Form b/html/FormTools/Form
index e048e68..b8b832f 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -96,7 +96,7 @@ $next_for_validation ||= $m->caller(1)->path;
 % foreach my $key (keys %request_args) {
 % next if (ref $request_args{$key} && ref $request_args{$key} ne 'ARRAY');
 % foreach my $val ( ref ($request_args{$key}) ? @{$request_args{$key}} : ($request_args{$key})) {
-% next if $forbid_persisting{$key};
+% next if $forbid_persisting->{$key};
 <input type="hidden" name="<%$key%>" value="<%$val%>" />
 % }
 % }

commit 1f277d7c56efef280a1f6c3e7a4fbd526515834b
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Tue Apr 14 20:10:11 2009 +0000

    Bump version

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index d887bd0..4bb1df8 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::FormTools;
 
-our $VERSION = '0.06_01';
+our $VERSION = '0.07_01';
 
 =head2 is_core_field
 

commit 6d8c6369cf6782b3250375f4685a5ca1ec893f8f
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Thu Apr 16 18:50:29 2009 +0000

    Use the default for the Content MessageBox

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 38c380c..2a805cc 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -70,6 +70,7 @@ unless ( $default ) {
     ($rows ? (Height => $rows) : ()),
     ($cols ? (Width => $cols) : ()),
     IncludeSignature => 0,
+    Default => $default,
 &>
 
 % } else {

commit a923bf35ff547abc985c21b41febd65b8e20badb
Author: Shawn Moore <sartak at bestpractical.com>
Date:   Thu Apr 16 18:50:35 2009 +0000

    Bump version

diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 4bb1df8..a6bd907 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::FormTools;
 
-our $VERSION = '0.07_01';
+our $VERSION = '0.07_02';
 
 =head2 is_core_field
 

commit 7b5f0bea27fc0e67ef8a5ed18e213230c43b3ac0
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Apr 27 20:53:20 2009 +0000

    * tell the CustomField about the ticket we're working with
      so that it can include ticket roles in the ACL search

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 2a805cc..c3fb563 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -35,6 +35,7 @@ if ( RT::Extension::FormTools::is_core_field($name) ) {
 } else {
 
     $cf = RT::CustomField->new( $session{'CurrentUser'} );
+    $cf->SetContextObject($ticket) if $cf->can('SetContextObject');
     $cf->LoadByName( Name => $name, Queue => $queue->id );
     unless ( $cf->id ) {
         die "Could not find a custom field called $name for the queue "

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list