summaryrefslogtreecommitdiff
path: root/dist/base
Commit message (Collapse)AuthorAgeFilesLines
* Replace multiple 'use vars' by 'our' in distNicolas R2017-11-115-8/+7
| | | | | | | | | | | | | | | | | | | | Using vars pragma is discouraged and has been superseded by 'our' declarations available in Perl v5.6.0 or later. Additionally using 'vars' pragma increase the memory consumption of a program by about 700 kB for no good reason. This commit is about replacing the usage of 'vars' pragma by 'our' in blead where it makes sense. ( leaving 'cpan' directory outside of the scope ) -- using vars perl -e 'use vars qw(@ISA $AUTOLOAD $VERSION); print qx{grep RSS /proc/$$/status} ' VmRSS: 2588 kB -- using our instead perl -e 'our (@ISA, $AUTOLOAD, $VERSION); print qx{grep RSS /proc/$$/status} ' VmRSS: 1864 kB
* Update MANIFEST and bump base $VERSION for previous commitSteve Hay2017-07-251-1/+1
|
* Limit dotless-INC effect on base.pm with guard:Aristotle Pagaltzis2017-07-254-2/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a more refined and accurate solution for removing '.' from @INC while reducing the false positives. The following explanation is roughly what is avaiable in the code comments. If you stumble upon this and feel like the commit message or the comments are not helpful enough, please introduce another commit that adds more explanation or improve the code comments (or both). Using if ($INC[-1] eq '.' && %{"$base\::"}) We decide that: The package already exists => this an optional load And: there is a dot at the end of @INC => we want to hide it However: we only want to hide it during our *own* require() (i.e. without affecting nested require()s). So we add a hook to @INC whose job is to hide the dot, but which first checks checks the callstack depth, because within nested require()s the callstack is deeper. Since CORE::GLOBAL::require makes it unknowable in advance what the exact relevant callstack depth will be, we have to record it inside a hook. So we put another hook just for that at the front of @INC, where it's guaranteed to run -- immediately. The dot-hiding hook does its job by sitting directly in front of the dot and removing itself from @INC when reached. This causes the dot to move up one index in @INC, causing the loop inside pp_require() to skip it. Loaded coded may disturb this precise arrangement, but that's OK because the hook is inert by that time. It is only active during the top-level require(), when @INC is in our control. The only possible gotcha is if other hooks already in @INC modify @INC in some way during that initial require(). Note that this jiggery hookery works just fine recursively: if a module loaded via base.pm uses base.pm itself, there will be one pair of hooks in @INC per base::import call frame, but the pairs from different nestings do not interfere with each other. (cherry picked from commit 571931bfa1120564fe207965f9ec2ea0f8bbbb8a) [This is a forward-port, with improved commit message by Sawyer X <xsawyerx@cpan.org>, of the commit that was cherry-picked into maint-5.22 and maint-5.24 as commits a93da9a38c and 1afa289000 respectively.]
* fix dist/base/t/*.t that assumed '.' in @INCDavid Mitchell2017-04-072-2/+2
|
* bump base.pm $VERSION and un-CUSTOMISEDavid Mitchell2017-03-241-1/+1
| | | | follow-up to the previous commit's reverting of base.pm @INC changes.
* Revert base.pm's dot-in-INC changes.David Mitchell2017-03-242-38/+2
| | | | | | | | | | | | | | | | | This reverts: 458470f62360040dcd4b5a55c8ba07503e1af5fc 362f3f748cb84934a072fadbfb8b51090e2f9afe bca552795994a553e07b38a6f82a233533919926 and the base.pm part of 8901ddee94b1bc3764b4278d1cb26bed30bc2605 This commit removes all the recent stuff that made base.pm localise @INC and remove a trailing '.'. This is because perl 5.26.0 will be released with '.' in @INC disabled by default. See RT #128769.
* [perl #128769] Improve base.pm @INC . messageFather Chrysostomos2016-08-042-3/+8
| | | | | The new version is based on one written by Chris Travers, polished up a bit by yours truly.
* [perl #128769] base.pm: Localize @INC unconditionallyFather Chrysostomos2016-08-011-3/+3
| | | | | | | As Zefram pointed out in <https://rt.perl.org/Ticket/Display.html?id=128769#txn-1414015>, having inconsistent behaviour is going to cause more problems than solves.
* [perl #128769] Improve base.pm @INC '.' handlingFather Chrysostomos2016-07-312-3/+30
| | | | | | | | | | | • Localise @INC only if necessary. • Don’t mention '.' in the @INC list in the error message, since it was not in the @INC that was searched (this is accomplished by local- ising @INC in the same scope as the error). • If a file exists that would have been loaded had '.' not been ignored, mention it and suggest ‘use lib’. • Use the same number of closing as opening parentheses in the error message.
* New bug numbers in lib/ and dist/, tooFather Chrysostomos2016-07-291-1/+1
| | | | | | This is my quick-and-dirty script: find dist -print0 | xargs -0 perl -pi -e 'BEGIN { %map = split " ", join "", `cat pb2rt.txt` } s/(?<!\d)\d{8}\.\d{3}(?!\d)/$& (#$map{$&})/g'
* dist/: bump $VERSION as neededTony Cook2016-07-261-1/+1
|
* dist/: remove . from @INC when loading optional modulesTony Cook2016-07-261-1/+5
| | | | | | I didn't update base.pm since that seems more likely to be loading modules *expected* to be in the current directory. Opinions welcome.
* base: fix a mis-statement in Changes fileRicardo Signes2015-11-211-1/+1
|
* base: new CPAN releaseRicardo Signes2015-11-213-2/+5
|
* base: no longer works on v5.6, require v5.8Ricardo Signes2015-11-134-3/+12
|
* base: prepare to make a new CPAN releaseRicardo Signes2015-11-104-40/+15
| | | | | ...eliminates some unneeded files, adds a Makefile.PL (for the INSTALLDIRS-picking behavior).
* bump $base::VERSION to 2.22Tony Cook2014-02-211-1/+1
|
* [perl #121196] only examine the name being includedTony Cook2014-02-212-4/+22
| | | | Checking the location called from broke require overrides.
* bump $base::VERSIONTony Cook2014-01-161-1/+1
|
* Fix base.pm nonexistent module check with open filesDagfinn Ilmari Mannsåker2014-01-163-2/+28
| | | | Tony Cook: update MANIFEST
* bump $VERSION for base.pmTony Cook2013-12-171-1/+1
|
* make base.pm more strict about nonexistent module checkGraham Knop2013-12-174-3/+72
|
* Increase $fields::VERSION to 2.17Father Chrysostomos2013-11-151-1/+1
|
* Revamp fields documentationFather Chrysostomos2013-11-141-38/+29
| | | | | | | | | | | | | | | • Actually give an example of a typed lexical. • Also show the syntax parenthetically in the pod, since the phrase ‘typed lexical’ is not exactly well known. • Don’t use dev version numbers. • Don’t talk about pseudo-hashes so pervasively, as the fact that they are used is more an implementation detail now than a feature (except for phash). • If we talk about restricted hashes, we should link to Hash::Util. • -w is not the only way to turn warnings on. Also mention in perlfunc that ‘my __PACKAGE__’ and ‘my CONSTANT’ work, so that the only mentions are not in perl561delta and Lexical::Types.
* [perl #118561] note that the check is fragile and refer to parent.pmTony Cook2013-07-031-0/+6
|
* Revert "[perl #118561] failures loading modules are ignored when sub-package ↵Tony Cook2013-07-032-7/+2
| | | | | | | | exists" This reverts commit c4f21d8bae2372c750ff63b7e5df47996baa1f39. This broke tests in Moose.
* [perl #118561] failures loading modules are ignored when sub-package existsGraham Knop2013-06-252-3/+8
|
* Update base.pm's Changes file from the perldeltasRafael Garcia-Suarez2012-03-311-0/+7
|
* Remove test for a functionality that was removedRafael Garcia-Suarez2012-03-311-14/+1
| | | | | (this wasn't found earlier because this test file is only run with perls <= 5.8.x)
* Adjust skip condition of tests for fields.pm to cover 5.14.*Rafael Garcia-Suarez2012-03-311-3/+3
| | | | and improve diagnostics
* base.pm: remove unused variableDavid Golden2011-09-221-3/+0
|
* base.pm no longer tracks loaded modulesDavid Golden2011-09-221-6/+2
| | | | | | | | | | | | | Tracking modules loaded by base.pm to avoid reloading them means that any module that wishes to force a reload can't just modify %INC but must also interact with base.pm to clear its cache. Removing the module-loaded checks have minimal impact. The internal call to require() is a NOP for a loaded module. For an internal package, the require() will fail with the same error message as before, which base.pm then ignores. Tracking modules loaded to avoid this slight extra overhead is not worth the complexity for other modules that wish to manipulate %INC.
* base.pm no longer modifies $VERSIONDavid Golden2011-09-222-24/+17
| | | | | | | | | | | | | | | Previously, base.pm modified the $VERSION of modules it loaded to the string "-1, set by base.pm". This is not a valid lax version string and thus could not be parsed by version.pm. (It is also an encapsulation violation, as it modifies a global in another package.) This patch removes the $VERSION modification code entirely and uses a private hash to track which modules base.pm has successfully loaded. This also eliminates a subtle bug in how base.pm was checking for the existence of a package's VERSION scalar. [Though the final mechanism is different, thank you to John Peacock for proposing the initial patch to eliminate the "-1..." code from base.pm]
* Fix a skip count in base's t/fields.tFlorian Ragwitz2011-09-051-1/+1
|
* Make verbatim pod in fields.pm fit in 80 columnsFather Chrysostomos2011-07-311-3/+3
| | | | (actually 79, so ‘comfortably within’ 80 columns)
* Allow restricted hashes containing COWs to be clearedFather Chrysostomos2011-06-041-2/+4
|
* Allow COW values to be deleted from restricted hashesFather Chrysostomos2011-06-041-1/+7
| | | | I wonder how many other things a604c75 broke....
* base.pm: pod: Remove obsolete referencesKarl Williamson2011-05-181-3/+3
|
* [perl #85638] Docs for 'inherit from yourself' warning in base.pmRobin Barker2011-03-071-1/+1
| | | | | | The "inherit from yourself" is triggered by C<package Foo; use base 'Foo';> not C<use Foo; use base 'Foo';> as stated in the documentation.
* Increase base.pm’s versionFather Chrysostomos2011-03-071-1/+1
|
* Fix typos (spelling errors) in dist/*Peter J. Acklam) (via RT2011-01-072-5/+5
| | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #81888] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81888 > Signed-off-by: Abigail <abigail@abigail.be>
* Update base.pm's META.ymlFlorian Ragwitz2010-09-051-11/+19
| | | | | It's there for Rafael's convenience when doing CPAN releases, as there's no separate base repository.
* Fix to MANIFEST in baseChas. Owens2010-07-011-2/+2
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Rename VMS-unfriendly multi-dot files.Craig A. Berry2009-12-192-0/+0
|
* Bump base and fields versions to 2.15Rafael Garcia-Suarez2009-10-224-3/+6
|
* Move base from ext/ to dist/Nicholas Clark2009-09-2917-0/+1785