[Jifty-commit] r6700 - in Jifty-DBI/trunk: . inc/Module lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Wed Mar 25 15:31:53 EDT 2009
Author: alexmv
Date: Wed Mar 25 15:31:52 2009
New Revision: 6700
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/Changes
Jifty-DBI/trunk/MANIFEST
Jifty-DBI/trunk/META.yml
Jifty-DBI/trunk/SIGNATURE
Jifty-DBI/trunk/inc/Module/Install.pm
Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm
Jifty-DBI/trunk/inc/Module/Install/Base.pm
Jifty-DBI/trunk/inc/Module/Install/Can.pm
Jifty-DBI/trunk/inc/Module/Install/Fetch.pm
Jifty-DBI/trunk/inc/Module/Install/Include.pm
Jifty-DBI/trunk/inc/Module/Install/Makefile.pm
Jifty-DBI/trunk/inc/Module/Install/Metadata.pm
Jifty-DBI/trunk/inc/Module/Install/Win32.pm
Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm
Jifty-DBI/trunk/lib/Jifty/DBI.pm
Log:
r43616 at kohr-ah: chmrr | 2009-03-25 15:30:45 -0400
0.53 releng
Modified: Jifty-DBI/trunk/Changes
==============================================================================
--- Jifty-DBI/trunk/Changes (original)
+++ Jifty-DBI/trunk/Changes Wed Mar 25 15:31:52 2009
@@ -1,5 +1,104 @@
Revision history for Perl extension Jifty::DBI.
+0.53 Wed Mar 25 15:27:03 EDT 2009
+- Major bugfixes:
+ * On rollback, flush the record cache. This fixes a bug when SQLite
+ reuses primary keys after rollback, and thus the record cache is
+ wrong.
+ * Apply filters to "default is ..." values, so "is boolean, default is
+ 0" works on postgres, for instance
+ * $self->_new_collection_args is passed to the ->new constructor of a
+ collection, not its ->new_item method
+
+- Performance fixes:
+ * Don't call accessor twice when we have values around
+ * Don't create temporary variables we don't need around, just return
+ * Optimize for the case when there are no output filters
+ * Play with self/class only when passed argument is not a reference
+ * In _do_search, separate prefetch and non-prefetch paths; the latter
+ is a much tighter loop
+ * Refactor first pass over results in prefetch path
+ * Move a ->new_item call where we only need it
+ * Jifty::DBI::Handle::SQLite - LOWER() in SQLite is expensive; it's
+ easier just put COLLATE NOCASE on the column side. Bump DBD::SQLite
+ to 1.14 which gives us COLLATE NOCASE.
+ * Cache on record table, not record class so subclasses also get
+ cached correctly. If the data in the underlying table changes,
+ regardless of the class you're using, you want to load the new data.
+ * Refactor _qualified_record_columns
+ * call ->table for defaulting only when we actually want defaulting
+ * Selay some method calls when possible in limit
+ * Minor refactoring of _get_alias
+ * grep before looping to loop over fewer values in load_from_hash
+ * Cache load attempts in new_item in a local static cache
+ * Cache filter class load attempts in _apply_filters
+ * Save some slow Class::Accessor calls in Jifty::DBI::Filter
+ * Stick aliases into COLUMNS as well, for faster lookup
+ * Provide a faster load_from_hash for when we're being called from
+ do_search
+
+- Datetime fixes:
+ * _formatter is *inheritable* class data. If it happens to get set by
+ the DateTime filter before getting set by one of its subclasses (the
+ Date and Time filters), than it is stuck on the DateTime _formatter
+ setting because the subclasses don't override it. There are a
+ couple solutions, the simplest being to check the value of _strptime
+ and update/override _formatter if it is different, which is what
+ I've done here. (This may not be the most optimized solution.)
+ * Require Time::Duration::Parse 0.06 to win us decimal durations like
+ 1.5h
+ * Fix a broken regex that just happened to work because we only fed it
+ correct data
+ * Add date_only method in date and datetime filters
+ * For date-only timestamps, set hour, minute, and second to zero
+ * Include the datetime string we're trying to decode in parse failure
+ cluck
+ * Use DateTime's strptime since we don't want additional logic
+
+- Documentation fixes:
+ * Minor POD improvement for debian lintian in Jifty::DBI::Column
+ * Adding an example of open_paren/close_paren and limit subclause.
+ * Added documentation for "IS" on limit().
+ * Additional docs for load_by_cols
+ * Update record_class' docs
+
+- Minor bugfixes:
+ * Perltidy, primarily for indentation fixes
+ * Update copyright year to 2009
+ * collections can now clear_order_by
+ * requires('perl' => '5.8.3') confuses M:I. the "correct" incantation
+ is perl_version('5.8.3')
+ * Add the ability to unload columns and prefetched values
+ * Use $args{'collection'}->limit instead of
+ $self->Jifty::DBI::Collection::limit so we don't break
+ * We accept IN or = as operators for array ref. values, so match
+ against that (and do it case insensitively to boot)
+ * Allow validators to get extra arguments
+ * Storable with non-bytea is OK if we base64
+ * add double naming schema for record references, using name, name_by
+ * fixed situation with 'column X_not_id refers_to M by "not_id"'
+ * Aliases should be virtual
+ * When we have group_by, the first column may not be enough to
+ distinctify the rows. But since they're grouped, they're all
+ distinct by definition.
+ * turn _handle _is_limited rows_per_page into accessors
+ * Clean out fetched when we load_from_hash
+ * Pass arguments database_Version to the super method
+ * Don't chomp Collection or s if prev character is ':', die instead,
+ it can happen for annon collections based either on JDBI::Collection
+ or J::Collection
+ * No need to setup the pager, its constructor does that for us;
+ actually it's really questionable that we need to setup pager when
+ there is no paging by default
+ * Don't optimize left joins on mysql 5.0 and newer, may be other DBs
+ can drop this too
+ * $caller->COLUMNS should not contain virtual methods from plugins
+ * Add "raw value" internal values
+ * Plugin import must not call ->columns which causes incorrect
+ caching.
+
+
+
0.49 Mon Apr 07 22:16:48 EST 2008
- Major changes:
* "is boolean" support for cross-database booleans
@@ -91,8 +190,9 @@
* Be a bit cleverer about not always doing a count before doing a select
(The previous behaviour was pathalogical)
-0.48 Thu Nov 29 16:28:11 EST 2007
+
+0.48 Thu Nov 29 16:28:11 EST 2007
* User and password values are excluded from the DSN in a more proper fashion
* Setting a default for RECORD_MIXINS and altering the mk_classdata() decls
to avoid any confusion with the mk_accessors() interface.
@@ -117,8 +217,9 @@
* manifest skip pm_to_blib, add new test file to manifest
* Update Changes
-0.47 Fri Nov 16 15:23:28 EST 2007
+
+0.47 Fri Nov 16 15:23:28 EST 2007
or, "The chmrr fixfest"
* Note for posterity why we can't apply acl checks to refers_to columns
@@ -161,13 +262,15 @@
* Whoops, turned off the wrong warning
* POD coverage
-0.46 Wed Nov 7 12:24:08 EST 2007
+
+0.46 Wed Nov 7 12:24:08 EST 2007
- POD Coverage nit
- Fix for a stray tempfiles bug reported by ANDK
-0.45
+
+0.45
Add a warning for mandatory+till until we fix it
Fix the mandatory/inactive tests
Modified: Jifty-DBI/trunk/MANIFEST
==============================================================================
--- Jifty-DBI/trunk/MANIFEST (original)
+++ Jifty-DBI/trunk/MANIFEST Wed Mar 25 15:31:52 2009
@@ -70,6 +70,7 @@
t/02searches_joins.t
t/03rebless.t
t/04memcached.t
+t/05raw_value.t
t/06filter.t
t/06filter_boolean.t
t/06filter_datetime.t
Modified: Jifty-DBI/trunk/META.yml
==============================================================================
--- Jifty-DBI/trunk/META.yml (original)
+++ Jifty-DBI/trunk/META.yml Wed Mar 25 15:31:52 2009
@@ -1,22 +1,22 @@
----
+---
author: ~
-build_requires:
- DBD::SQLite: 0
+build_requires:
+ DBD::SQLite: 1.14
Test::More: 0.52
Test::Warn: 0.1
distribution_type: module
-generated_by: Module::Install version 0.68
+generated_by: 'Module::Install version 0.79'
license: perl
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
name: Jifty-DBI
-no_index:
- directory:
+no_index:
+ directory:
- ex
- inc
- t
-requires:
+requires:
Cache::Simple::TimedExpiry: 0.21
Class::Accessor::Fast: 0
Class::Data::Inheritable: 0
@@ -25,7 +25,7 @@
Clone: 0
DBI: 0
DBIx::DBSchema: 0.34
- Data::Page: 0
+ Data::Page: 2.0
DateTime: 0.34
DateTime::Format::ISO8601: 0
DateTime::Format::Strptime: 0
@@ -39,4 +39,6 @@
YAML::Syck: 0
perl: 5.8.3
version: 0
-version: 0.49
+resources:
+ license: http://dev.perl.org/licenses/
+version: 0.53
Modified: Jifty-DBI/trunk/SIGNATURE
==============================================================================
--- Jifty-DBI/trunk/SIGNATURE (original)
+++ Jifty-DBI/trunk/SIGNATURE Wed Mar 25 15:31:52 2009
@@ -14,10 +14,10 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 a1e90ada944f4f566a22eb278ddf514153053c81 Changes
-SHA1 d44e458dea3e9f8afe04fead6857c9360d232af8 MANIFEST
-SHA1 819374d4317fb068696f1f6e1bc1f1e3868d9fa6 META.yml
-SHA1 13801def329494f8f119a2659f71b710f9d13aa3 Makefile.PL
+SHA1 dff41b1fc8b74cb89e2e268e3ccb15132f0b7a65 Changes
+SHA1 6244026b27f75e581c672d49327905888b088629 MANIFEST
+SHA1 d3897bc376b40669acb9171adfd51f321d184fd8 META.yml
+SHA1 48bd6ca8a37ec79b7cae91028d7e9489ad33a03b Makefile.PL
SHA1 ae8407c841f230c353f683bd5c257815aed9b9f0 README
SHA1 82d6ac3f6def48558d09f8b6e3b53ed4194d8c81 ROADMAP
SHA1 9d304f35438f847863969f6a069598379f5a9db2 debian/README
@@ -30,25 +30,25 @@
SHA1 7cea1a5289f79c2a87837924a83feb583f6e8890 ex/Example/Model/Employee.pm
SHA1 a9d62e4f5b43b2f78066172a4771238ee7df6339 ex/create_tables.pl
SHA1 603bb9de29fb8cba7f13409c546750972eff645d inc/Module/AutoInstall.pm
-SHA1 7e2cfa1b9efe0d502ee57717649c90ba4bd28ba9 inc/Module/Install.pm
-SHA1 182a0df45b65151afdc2be0b7246a2d02d0f0567 inc/Module/Install/AutoInstall.pm
-SHA1 6e1392d80a0f239eecd5664f7f21f922cedb9329 inc/Module/Install/Base.pm
-SHA1 f69417fe831d9cc22a78f00a617afadceade4d81 inc/Module/Install/Can.pm
-SHA1 c61d02895330310048bf388881b5e2e064031561 inc/Module/Install/Fetch.pm
-SHA1 4933b00c3a646da8d223c6957f94552bbd62f8c6 inc/Module/Install/Include.pm
-SHA1 54fcbed19232ec959bb17cfb4410599afc7f0779 inc/Module/Install/Makefile.pm
-SHA1 7d3be9b158e37b2b2c22084740099955623b1d56 inc/Module/Install/Metadata.pm
-SHA1 0a8b66180229ba2f9deaea1fedd0aacf7a7ace6b inc/Module/Install/Win32.pm
-SHA1 d3352eb33fe43a5f3ead513f645224fe34d73bc9 inc/Module/Install/WriteAll.pm
-SHA1 d995b8919444a5245c506495b96aab104f7b8166 lib/Jifty/DBI.pm
-SHA1 09eb4ebb041498d7e8077eed0f013fefb2cc1606 lib/Jifty/DBI/Collection.pm
+SHA1 ae018c4565c1277089ca8f1b28f888d95430cb7f inc/Module/Install.pm
+SHA1 0a6f29536bedea3bb94744a7d43ffe39da7e4819 inc/Module/Install/AutoInstall.pm
+SHA1 4552acdfca8b78f8015d8449e1325616259095f5 inc/Module/Install/Base.pm
+SHA1 7fb663fff161fb45882b52edd62857bf15359658 inc/Module/Install/Can.pm
+SHA1 8b1d3db746faa6faf2d967a48d3812ec1f44b4c6 inc/Module/Install/Fetch.pm
+SHA1 d7ce736cdd05d5156d379ef39cca93beeeeba828 inc/Module/Install/Include.pm
+SHA1 9f6beaa2f4749ceb5dd0c9b0c647d0f3289c7b46 inc/Module/Install/Makefile.pm
+SHA1 7ad1da4fff7a1e7a634c9d734111c8292be08884 inc/Module/Install/Metadata.pm
+SHA1 e9aa83f3e8b16ccfce544a90a57b63b70a497759 inc/Module/Install/Win32.pm
+SHA1 ade2ac0b0246d4d8e28fa46942e53f6925abda46 inc/Module/Install/WriteAll.pm
+SHA1 071207f492e64cafed55c2c65f3d12b43408395b lib/Jifty/DBI.pm
+SHA1 f181211220602d2883fd8d006fdb3c79ca417b05 lib/Jifty/DBI/Collection.pm
SHA1 639ef9c81f03fb084b312a5f9a6f6a3ff63b36b7 lib/Jifty/DBI/Collection/Union.pm
SHA1 bcba77fd2bacf0475aea1de97f57365c8de92ca6 lib/Jifty/DBI/Collection/Unique.pm
-SHA1 0e6346b30448482f0265221325de4b209dcc13fb lib/Jifty/DBI/Column.pm
-SHA1 cdce125423fb907a12e888a60522cb5d03cda5c0 lib/Jifty/DBI/Filter.pm
+SHA1 fe97ce175ebf6e001773449531b1971d86c3ec5b lib/Jifty/DBI/Column.pm
+SHA1 c21a985a5b799e50f2624e0fa6daee0895313825 lib/Jifty/DBI/Filter.pm
SHA1 e030c3ef5c723ba6dce2e3fc23afecf2a6dfe260 lib/Jifty/DBI/Filter/Boolean.pm
-SHA1 87192bf64a224cbea78770f4209ecae9981f3f5c lib/Jifty/DBI/Filter/Date.pm
-SHA1 70ffc9da2f13fc1aabd652169ba5a08b292ba678 lib/Jifty/DBI/Filter/DateTime.pm
+SHA1 d0addaa43cfa8950cb33d42a364a3c3c56a2dd59 lib/Jifty/DBI/Filter/Date.pm
+SHA1 92528e882daf77aea6aff118c223f578f702f87a lib/Jifty/DBI/Filter/DateTime.pm
SHA1 561ee05d174cb1a40be59cd1ef271b6a6c458d27 lib/Jifty/DBI/Filter/Duration.pm
SHA1 79649ca3fb9f8aa9d2fdda00d6d7c7c99fe4092f lib/Jifty/DBI/Filter/SaltHash.pm
SHA1 45ff3c7d2c03136acf98b74c659e2fe8c734d929 lib/Jifty/DBI/Filter/Storable.pm
@@ -58,35 +58,36 @@
SHA1 67ffe7188a1f529d7594f4fa3803bcbe15ba6485 lib/Jifty/DBI/Filter/YAML.pm
SHA1 9a6fd17e677321904436fefec4d434e17a4685b1 lib/Jifty/DBI/Filter/base64.pm
SHA1 deb33fa7b35f3542aac3e2d7fb4b5d3070dc3917 lib/Jifty/DBI/Filter/utf8.pm
-SHA1 fdc47b3260594e60500125246b6f8a8f92ea142a lib/Jifty/DBI/Handle.pm
+SHA1 319dd0ee5a65b40ca41c0223db6c4acd13ab9f6f lib/Jifty/DBI/Handle.pm
SHA1 bcc7c456e1c4d0dddd5564f03c8bb03a6c7e261f lib/Jifty/DBI/Handle/Informix.pm
SHA1 338116a45f8eb6bfca5e76e8d3be78fb61fffe81 lib/Jifty/DBI/Handle/ODBC.pm
SHA1 960fd0b63f3de11924c5d47a3c0c6d1db105ed5b lib/Jifty/DBI/Handle/Oracle.pm
-SHA1 88573513df75869a536443e4a34006477577df9f lib/Jifty/DBI/Handle/Pg.pm
-SHA1 860b373ddb0d0a1d001f20c721d9dffe003e2517 lib/Jifty/DBI/Handle/SQLite.pm
+SHA1 23eeff073884c8951e004be4308ca946a1d5e205 lib/Jifty/DBI/Handle/Pg.pm
+SHA1 d8b18e59ccc89ae80f4fdb4d0db70b85c3a76cd0 lib/Jifty/DBI/Handle/SQLite.pm
SHA1 bba2314c20fcc3ef71cc69090f1cd6bd515cd9b4 lib/Jifty/DBI/Handle/Sybase.pm
-SHA1 e6041a34c3044ed8b9691a5629ecf146fed95257 lib/Jifty/DBI/Handle/mysql.pm
+SHA1 643cae4f858c4e7273e5c03f13b3cb910b0840bb lib/Jifty/DBI/Handle/mysql.pm
SHA1 f2cc4fcce79c9a88a023d4e6bd96c2089eef1ced lib/Jifty/DBI/Handle/mysqlPP.pm
-SHA1 0e975f9ec5480ca09025c592c06d484058e637df lib/Jifty/DBI/HasFilters.pm
-SHA1 954c6673811421607d8780038934f39b7700fb84 lib/Jifty/DBI/Record.pm
-SHA1 1c8b4adcd312024a3408a52d3b2ef288c2084603 lib/Jifty/DBI/Record/Cachable.pm
-SHA1 526ea0d42808425435c21ffb0bc4b92c636a6176 lib/Jifty/DBI/Record/Memcached.pm
-SHA1 6a70dc2a6fd6a5d77502d391ac2630d91a681c1a lib/Jifty/DBI/Record/Plugin.pm
-SHA1 95c3151c475f1ffea7ce33ced9166d601c5ecdfe lib/Jifty/DBI/Schema.pm
-SHA1 36a88a3bec092873e86ca2f1cf7edbdb5b358a53 lib/Jifty/DBI/SchemaGenerator.pm
+SHA1 f2e9353e3f71443763509d52d9333a135b2cc56b lib/Jifty/DBI/HasFilters.pm
+SHA1 d3cf1144c66a81f78144f45e10588451c34d11f6 lib/Jifty/DBI/Record.pm
+SHA1 3853ce268985b129f2175251fb369d9689837f39 lib/Jifty/DBI/Record/Cachable.pm
+SHA1 1aac77960c508d3b2e5188e15825ad5b04391d76 lib/Jifty/DBI/Record/Memcached.pm
+SHA1 53834b3315a509ba33a8647681f472d3ae7b0557 lib/Jifty/DBI/Record/Plugin.pm
+SHA1 57bc9b11c97dc13f538f7b210dc060b38fba2c2f lib/Jifty/DBI/Schema.pm
+SHA1 8e7badfee526f44d09ba09641cf485ed601bd76a lib/Jifty/DBI/SchemaGenerator.pm
SHA1 32834b7c4cf5a8d131382fccc8db341be8768291 t/00.load.t
SHA1 9aa7fed2b2409faa4c71d2a45db210721f47403e t/01-version_checks.t
SHA1 13c9fe3eeec0d000a7c86ea2474e30186cbc37e2 t/01basics.t
SHA1 018309dfc89440dc670cccf6138e3d4679465b47 t/01records.t
SHA1 7574130aa1dc5338b6efcd0f04eca3f6dc4b2696 t/01searches.t
SHA1 df97ee4e5bcb4ef0663dcc1a8db86dc66e8d9206 t/02-column_constraints.t
-SHA1 90a5b9c663002e3c43a00b7f9a04d6ec2787500e t/02records_cachable.t
+SHA1 1c2bd056c575bc74caf2e59bdda8d8eb2731a3e7 t/02records_cachable.t
SHA1 33642a61fd4b5a88436a82c6dd0fef359ba74a2b t/02records_object.t
-SHA1 369d71ca9ec0f00116ac6be24e017f592ac9cc45 t/02searches_joins.t
+SHA1 a5b0e1f214e029ee41e822a19cf07a3250264d3f t/02searches_joins.t
SHA1 f1f330dd8b4144e3437aba1455053903306bd0bc t/03rebless.t
SHA1 62c42d8458d73898f47f1b72d757239747321ef5 t/04memcached.t
+SHA1 4d2b42f80c2adaab70aa236a720cf57fa4b65677 t/05raw_value.t
SHA1 f0371e275879019e2abe732bbb5626d0d05049a0 t/06filter.t
-SHA1 bfb0f7133ce399738b2afe6e9e716134289acaa6 t/06filter_boolean.t
+SHA1 646947b41cfcddf80b627505940244aed2c6c5ea t/06filter_boolean.t
SHA1 8d464426f2c5b0ab5ecc5a0a0331e5f77669c2dc t/06filter_datetime.t
SHA1 172f655a7fdb4771e6e8b3aee45e93b1264a5567 t/06filter_duration.t
SHA1 1c0727c29fb58462710e4578a237d557b8453a07 t/06filter_storable.t
@@ -96,7 +97,7 @@
SHA1 64c3722f5b34feafc87113257079721c174f3f96 t/10schema.t
SHA1 0f4655f0a4e558ac31df7b7fdf17c9b110f934da t/11schema_records.t
SHA1 22a083137927a8635b02931e40f80c60220ec3a7 t/12prefetch.t
-SHA1 063586c498fdc7fc90519f1d1a3e37838d637104 t/13collection.t
+SHA1 2389b47958bd6f92a561ca893d7bfab166ced127 t/13collection.t
SHA1 41b7fbaf031d103a4f2066f177cc3bee84ab0458 t/14handle-pg.t
SHA1 4f41229caa246bf6ebb369010deb0c1eb8809666 t/15types.t
SHA1 5958e59e29d29fbf3862b5d3471472cbd82d191e t/16inheritance.t
@@ -111,9 +112,9 @@
SHA1 62742c946808f35bcc8b2777e975c1ce068a0a71 t/testmodels.pl
SHA1 2cf6ba23eb00dfed6f10533830da066c774c030c t/utils.pl
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.7 (Darwin)
+Version: GnuPG v2.0.9 (GNU/Linux)
-iD8DBQFH+t3rsxfQtHhyRPoRAlcOAJkBmvOV+Fc/7t5ULT/HPwXwlGgCzQCeJBy7
-6UTu17Js7YWoKbUQ6XpP8j8=
-=cQ9D
+iEYEARECAAYFAknKhi8ACgkQMflWJZZAbqA9NgCgpEvp0YR8wmewsAjdivLnuTBC
+7+oAnAlaNaoZzLoGESkZy5LGG4ZLeZJE
+=XNEb
-----END PGP SIGNATURE-----
Modified: Jifty-DBI/trunk/inc/Module/Install.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install.pm Wed Mar 25 15:31:52 2009
@@ -17,20 +17,30 @@
# 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.68';
+ # 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.79';
+
+ *inc::Module::Install::VERSION = *VERSION;
+ @inc::Module::Install::ISA = __PACKAGE__;
+
}
+
+
+
+
# 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 +48,29 @@
# 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,115 +78,144 @@
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 ) { 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
+
+
+
+
+
+# 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;
- 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";
+ unless ( uc($1) eq $1 ) {
+ unshift @_, ( $self, $1 );
+ goto &{$self->can('call')};
+ }
+ };
}
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 = shift;
+ 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) = @_;
+ 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";
+ # 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";
+ $args{wrote} = 0;
- bless( \%args, $class );
+ bless( \%args, $class );
}
sub call {
@@ -184,98 +226,144 @@
}
sub load {
- my ($self, $method) = @_;
-
- $self->load_extensions(
- "$self->{prefix}/$self->{path}", $self
- ) unless $self->{extensions};
+ my ($self, $method) = @_;
- foreach my $obj (@{$self->{extensions}}) {
- return $obj if $obj->can($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";
+ 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) = @_;
+ 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 );
- }
+ unless ( grep { !ref $_ and 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} ||= [];
+ $self->{extensions} ||= [];
}
sub find_extensions {
- my ($self, $path) = @_;
+ 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;
- 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;
- }
+ # 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) ) {
+ 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
+ next if /^\s*#/; # and comments
+ if ( m/^\s*package\s+($pkg)\s*;/i ) {
+ $pkg = $1;
+ last;
+ }
+ }
+ }
- push @found, [ $file, $pkg ];
- }, $path ) if -d $path;
+ push @found, [ $file, $pkg ];
+ }, $path ) if -d $path;
- @found;
+ @found;
}
+
+
+
+
+#####################################################################
+# Utility Functions
+
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;
+}
+
+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 - 2009 Adam Kennedy.
Modified: Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm Wed Mar 25 15:31:52 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.68';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Jifty-DBI/trunk/inc/Module/Install/Base.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Base.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Base.pm Wed Mar 25 15:31:52 2009
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.68';
+$VERSION = '0.79';
# Suspend handler for "redefined" warnings
BEGIN {
@@ -45,6 +45,8 @@
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
}
+#line 101
+
sub is_admin {
$_[0]->admin->VERSION;
}
@@ -67,4 +69,4 @@
1;
-#line 138
+#line 146
Modified: Jifty-DBI/trunk/inc/Module/Install/Can.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Can.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Can.pm Wed Mar 25 15:31:52 2009
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.68';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -39,6 +39,7 @@
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 @@
__END__
-#line 157
+#line 158
Modified: Jifty-DBI/trunk/inc/Module/Install/Fetch.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Fetch.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Fetch.pm Wed Mar 25 15:31:52 2009
@@ -6,20 +6,20 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.68';
+ $VERSION = '0.79';
$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;
}
Modified: Jifty-DBI/trunk/inc/Module/Install/Include.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Include.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Include.pm Wed Mar 25 15:31:52 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.68';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Jifty-DBI/trunk/inc/Module/Install/Makefile.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Makefile.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Makefile.pm Wed Mar 25 15:31:52 2009
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.68';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -36,9 +36,9 @@
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 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} || (), @_),
);
}
@@ -104,8 +104,8 @@
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,10 +114,21 @@
my $self = shift;
die "&Makefile->write() takes no arguments\n" if @_;
+ # Make sure we have a new enough
+ require ExtUtils::MakeMaker;
+
+ # 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 };
@@ -142,9 +153,12 @@
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) {
@@ -167,7 +181,9 @@
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);
@@ -180,7 +196,7 @@
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
: '';
@@ -205,7 +221,7 @@
#$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 +250,4 @@
__END__
-#line 363
+#line 379
Modified: Jifty-DBI/trunk/inc/Module/Install/Metadata.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Metadata.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Metadata.pm Wed Mar 25 15:31:52 2009
@@ -6,63 +6,110 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.68';
+ $VERSION = '0.79';
$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{
- 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 }
-
-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;
- };
+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 ) {
+ *$key = sub {
+ my $self = shift;
+ return $self->{values}{$key} if defined wantarray and !@_;
+ $self->{values}{$key} = shift;
+ return $self;
+ };
+}
+
+foreach my $key ( @resource_keys ) {
+ *$key = sub {
+ my $self = shift;
+ unless ( @_ ) {
+ return () unless $self->{values}{resources};
+ return map { $_->[1] }
+ grep { $_->[0] eq $key }
+ @{ $self->{values}{resources} };
+ }
+ return $self->{values}{resources}{$key} unless @_;
+ my $uri = shift or die(
+ "Did not provide a value to $key()"
+ );
+ $self->resources( $key => $uri );
+ return 1;
+ };
+}
+
+foreach my $key ( grep {$_ ne "resources"} @tuple_keys) {
+ *$key = sub {
+ my $self = shift;
+ return $self->{values}{$key} unless @_;
+ my @added;
+ while ( @_ ) {
+ my $module = shift or last;
+ my $version = shift || 0;
+ push @added, [ $module, $version ];
+ }
+ push @{ $self->{values}{$key} }, @added;
+ return map {@$_} @added;
+ };
}
-# configure_requires is currently a null-op
-sub configure_requires { 1 }
+# 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') }
@@ -71,266 +118,393 @@
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 {
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()"
+ );
+
+ # Normalize the version
+ $version = $self->_perl_version($version);
+
+ # We don't support the reall old versions
+ unless ( $version >= 5.005 ) {
+ die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
+ }
+
+ $self->{values}{perl_version} = $version;
+}
+
+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 ) = @_;
+ 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;
+ 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;
+ 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;
+
+ return 1;
}
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
- ]
- );
+ 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 = \@_;
+ }
- return @$features;
+ 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 );
+ my $self = shift;
+ $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 ) {
- 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;
+ # 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)
- );
-}
-
-sub _slurp {
- my ( $self, $file ) = @_;
-
- local *FH;
- open FH, "< $file" or die "Cannot open $file.pod: $!";
- do { local $/; <FH> };
+ require ExtUtils::MM_Unix;
+ my ( $self, $file ) = @_;
+ $self->abstract(
+ bless(
+ { DISTNAME => $self->name },
+ 'ExtUtils::MM_Unix'
+ )->parse_abstract($file)
+ );
+}
+
+# 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 ) = @_;
-
- 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 = shift;
+ if (
+ Module::Install::_read($_[0]) =~ m/
+ ^
+ (?:use|require) \s*
+ v?
+ ([\d_\.]+)
+ \s* ;
+ /ixms
+ ) {
+ my $perl_version = $1;
+ $perl_version =~ s{_}{}g;
+ $self->perl_version($perl_version);
+ } else {
+ warn "Cannot determine perl version info from $_[0]\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 = shift;
+ my $content = Module::Install::_read($_[0]);
+ 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 $_[0]\n";
+ }
}
sub license_from {
- my ( $self, $file ) = @_;
+ my $self = shift;
+ if (
+ Module::Install::_read($_[0]) =~ 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 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,
+ '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 ) {
+ $self->license($license);
+ return 1;
+ }
+ }
+ }
+
+ warn "Cannot determine license info from $_[0]\n";
+ return 'unknown';
+}
- 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.";
+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;
+}
+
+# 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)
+sub _perl_version {
+ my $v = $_[-1];
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+ $v =~ s/(\.\d\d\d)000$/$1/;
+ $v =~ s/_.+$//;
+ if ( ref($v) ) {
+ $v = $v + 0; # Numify
+ }
+ return $v;
+}
+
+
+
+
+
+######################################################################
+# MYMETA.yml Support
+
+sub WriteMyMeta {
+ $_[0]->write_mymeta;
+}
+
+sub write_mymeta {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return unless -f 'META.yml';
+
+ # Merge the perl version into the dependencies
+ my $val = $self->Meta->{values};
+ my $perl = delete $val->{perl_version};
+ if ( $perl ) {
+ $val->{requires} ||= [];
+ my $requires = $val->{requires};
+
+ # Canonize to three-dot version after Perl 5.6
+ if ( $perl >= 5.006 ) {
+ $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
}
- $self->license($license);
- return 1;
- }
- }
- }
+ unshift @$requires, [ perl => $perl ];
+ }
+
+ # Load the advisory META.yml file
+ require YAML::Tiny;
+ my @yaml = YAML::Tiny::LoadFile('META.yml');
+ my $meta = $yaml[0];
+
+ # Overwrite the non-configure dependency hashs
+ delete $meta->{requires};
+ delete $meta->{build_requires};
+ delete $meta->{recommends};
+ if ( exists $val->{requires} ) {
+ $meta->{requires} = { map { @$_ } @{ $val->{requires} } };
+ }
+ if ( exists $val->{build_requires} ) {
+ $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
+ }
- warn "Cannot determine license info from $file\n";
- return 'unknown';
+ # Save as the MYMETA.yml file
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
}
1;
Modified: Jifty-DBI/trunk/inc/Module/Install/Win32.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Win32.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/Win32.pm Wed Mar 25 15:31:52 2009
@@ -4,11 +4,11 @@
use strict;
use Module::Install::Base;
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.68';
- $ISCORE = 1;
+ $VERSION = '0.79';
@ISA = qw{Module::Install::Base};
+ $ISCORE = 1;
}
# determine if the user needs nmake, and download it if needed
@@ -16,7 +16,7 @@
my $self = shift;
$self->load('can_run');
$self->load('get_file');
-
+
require Config;
return unless (
$^O eq 'MSWin32' and
@@ -38,8 +38,7 @@
remove => 1,
);
- if (!$rv) {
- die <<'END_MESSAGE';
+ die <<'END_MESSAGE' unless $rv;
-------------------------------------------------------------------------------
@@ -59,7 +58,7 @@
-------------------------------------------------------------------------------
END_MESSAGE
- }
+
}
1;
Modified: Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm (original)
+++ Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm Wed Mar 25 15:31:52 2009
@@ -4,40 +4,37 @@
use strict;
use Module::Install::Base;
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.68';
- $ISCORE = 1;
+ $VERSION = '0.79';
@ISA = qw{Module::Install::Base};
+ $ISCORE = 1;
}
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;
- }
- }
+ 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->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;
Modified: Jifty-DBI/trunk/lib/Jifty/DBI.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI.pm Wed Mar 25 15:31:52 2009
@@ -205,7 +205,7 @@
=head1 LICENSE
-Jifty::DBI is Copyright 2005-2008 Best Practical Solutions, LLC.
+Jifty::DBI is Copyright 2005-2009 Best Practical Solutions, LLC.
Jifty::DBI is distributed under the same terms as Perl itself.
=cut
More information about the Jifty-commit
mailing list