Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b397c9b
Add a test for trailing whitespace.
shlomif Dec 2, 2013
984138d
Add gitignore.
shlomif Dec 2, 2013
4c9f16c
Add changes.
shlomif Dec 2, 2013
12a914f
Update the POD.
shlomif Dec 2, 2013
58b6f9e
Convert Build.PL to Test::Run::Builder.
shlomif Dec 2, 2013
9879709
Modernise Build.PL.
shlomif Dec 2, 2013
576870a
Fix warning on ".".
shlomif Dec 2, 2013
64faea1
Add to the TODO.
shlomif Dec 2, 2013
1cef064
Bump the version to 0.23.
shlomif Dec 2, 2013
e1e1b04
Add keywords and repository-link.
shlomif Dec 3, 2013
3eeff37
Fix the link to the repository.
shlomif Dec 27, 2013
afa262f
Bump the version number to 0.25.
shlomif Dec 27, 2013
99fc544
LICENSE file and section.
shlomif Jan 31, 2014
4fb96ca
Add minimal version of perl.
shlomif Jan 31, 2014
0acfd73
Bump version to 0.26
shlomif Jan 31, 2014
388a510
Cache parsed range patterns
Apr 29, 2014
1497b82
Document the latest change.
shlomif Apr 29, 2014
7b2a8ef
C-style for loop to ranged for.
shlomif Apr 29, 2014
2498748
Cleanups and optimisations.
shlomif Apr 29, 2014
cc29c99
Update formatting using perltidy
labrown Jan 21, 2015
9583303
Use lexical loop variables.
labrown Jan 21, 2015
3164b72
Clean up Exporter stuff
labrown Jan 21, 2015
2096f2e
Use negative array index instead of $#var
labrown Jan 21, 2015
5e00ada
Always unpack @_ first
labrown Jan 21, 2015
e0e83c9
Apply perltidy -pbp -nst formatting
labrown Jan 21, 2015
a19d2ed
Use direct object syntax for new
labrown Jan 21, 2015
2084539
Use lexical variables instead of package variables
labrown Jan 21, 2015
e4229c0
Avoid ambiguously named 'last' variables
labrown Jan 21, 2015
33d661f
Remove useless use of $_
labrown Jan 22, 2015
d368207
Don't use quotes with strings containing no non-whitespace
labrown Jan 22, 2015
f7c23a8
Use regex instead of string in split
labrown Jan 22, 2015
5999421
Use brackets with double sigil derefrerence
labrown Jan 22, 2015
11faa05
Do not use postfix control 'if' structure
labrown Jan 22, 2015
a6c8c7d
Useless interpolation of literal string
labrown Jan 22, 2015
284211c
One more perltidy cleanup
labrown Jan 22, 2015
c7b87a4
Add .perlcriticrc
labrown Jan 22, 2015
fea7705
Add rand_gen parameter to new
labrown Jan 22, 2015
2cbaca4
Add t/07_rand_gen.t to the MANIFEST.
shlomif Jan 22, 2015
8fa24ae
update the Changes.
shlomif Jan 22, 2015
a0e9bc3
Small optimisation to an earlier commit.
shlomif Jan 22, 2015
5f80a76
Bump version to 0.27.
shlomif Jan 22, 2015
0f26ba8
Convert Changes to CPAN::Changes.
shlomif Jan 22, 2015
dc1d8c2
Bump version to 0.28.
shlomif Jan 22, 2015
6531007
Add dependency on 'parent'.
shlomif Dec 24, 2015
e3ffb85
Add note about how to generate a secure random pattern
jmaslak Jun 22, 2016
c9fcbb0
Correct some typos in the last commit.
shlomif Jun 23, 2016
cab9cad
Add a test for POD coverage.
shlomif Jun 23, 2016
4cef05c
Convert to dzil
shlomif May 22, 2018
9465a9d
Add README file for GitHub .
shlomif Jun 1, 2018
788ee8a
Add travis-ci.
shlomif Jun 2, 2018
abc47bf
Fix tidyall tests.
shlomif Oct 7, 2020
49dc824
remove annocpan link; dist.ini cleanups
shlomif Oct 17, 2020
8db4602
Add the get_ & set_pattern methods
Sep 13, 2021
6e9b99d
Initial commit
Sep 13, 2021
cc73d92
Fix get/set docs a bit
Sep 13, 2021
2fbfa55
prepare for a release
shlomif Sep 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Build
META.json
META.yml
MYMETA.json
MYMETA.yml
String-Random-0*
_build
blib
29 changes: 29 additions & 0 deletions .perlcriticrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
##
## Do not use these
# Don't worry about /s on regex
[-RegularExpressions::RequireDotMatchAnything]
# Don't worry about /m on regex
[-RegularExpressions::RequireLineBoundaryMatching]
# Don't worry about /x on regex
[-RegularExpressions::RequireExtendedFormatting]
# Don't worry about magic numbers
[-ValuesAndExpressions::ProhibitMagicNumbers]
# Don't worry about quotes and noisy strings
[-ValuesAndExpressions::ProhibitNoisyQuotes]
# Don't worry about #_ use
[-BuiltinFunctions::ProhibitUselessTopic]
# Don't worry about spelling
[-Documentation::PodSpelling]
# Disagree with this one
[-CodeLayout::ProhibitParensWithBuiltins]
# Don't worry about escaped meta chars
[-RegularExpressions::ProhibitEscapedMetacharacters]
# Don't worry about interpolating meta chars
[-ValuesAndExpressions::RequireInterpolationOfMetachars]

#
[-Documentation::RequirePodSections]

[Modules::ProhibitExcessMainComplexity]
max_mccabe = 40

10 changes: 10 additions & 0 deletions .tidyallrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[PerlCritic]
argv =
select = {t,lib,scripts}/**/*.{pl,pm,t} {t,lib,scripts}/*.{pl,pm,t}

[PerlTidy]
argv = -ci=4 -bl -cti=0 --character-encoding=none
select = {t,lib,scripts}/**/*.{pl,pm,t} {t,lib,scripts}/*.{pl,pm,t}

[TestCount]
select = t/*.t
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
sudo: false
language: perl
perl:
- '5.26'
- '5.24'
- '5.22'
- '5.20'
- 'blead'
matrix:
allow_failures:
- perl: 'blead'
fast_finish: true
before_install:
- git config --global user.name "TravisCI"
- git config --global user.email $HOSTNAME":not-for-mail@travis-ci.org"
install:
- cpanm --quiet --notest --skip-satisfied Dist::Zilla Pod::Weaver::Section::Support
- "(cd . && dzil authordeps --missing | grep -vP '[^\\w:]' | xargs -n 5 -P 10 cpanm --quiet --notest)"
- "(cd . && dzil listdeps --author --missing | grep -vP '[^\\w:]' | cpanm --verbose)"
script:
- "cd . && dzil smoke --release --author"
16 changes: 0 additions & 16 deletions Build.PL

This file was deleted.

164 changes: 105 additions & 59 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,61 +1,107 @@
Revision history for Perl extension String::Random:

0.22 Thu Sep 21 2006
- Fix README to reflect current reality.
- Random cleanup in this file.
- Since we've broken compatibility with *really* old Perl5 anyway,
modernize a bit more ("our" instead of "use vars"). Also
explicitly require 5.6.1.

0.21 Thu Apr 20 2006
- Modify test.pl to use Test::More.
- Build with Module::Build.
- Minor whitespace cleanup.
- Avoid undefined results from randregex() and randpattern().
- Turn on warnings in the module.

0.20 Mon Sep 29 2003
- Added support for *, +, and ? in regular expressions.

0.1992 Thu Jul 25 2002
- Added support for {n,m} ranges in regular expressions.
- Cleaned up the initialization of @punct.

0.1991 Thu Feb 28 2002
- Added a "b" for random binary data in randpattern().

0.199 Tue Feb 26 2002
- fixed randregex() and randpattern() to Do The Right Thing(TM)
when called in an array or scalar context, and when passed
multiple arguments.
(* WARNING * This is an incompatible change. Code expecting the
behavior of earlier versions may break. Of course, the documentation
warned that this change would be made, and everybody reads
documentation, right? :-)
- fixed use of $_ in randpattern().
(Unfortunately, there's still one use of $_ in a grep(), but I don't
see how that can be avoided, and it only happens once on
initialization.)

0.198 Tue May 16 2000
- fixed \W generating "_"
- reorganized a bit to make it easier to add more patterns
- added \s and \S
- added two-character literals (\t, \n, \r, \f, \a, \e)

0.197 Sat Jul 10 1999
- moved most of randregex() to %regch
- added random_regex() function interface

0.195 Wed Jul 7 1999
- regex support is (at least mostly) complete

0.19 Sun Jul 4 1999
- first pass of regex support

0.1 Thu Sep 10 1998
- original version

$Id: Changes,v 1.13 2006/09/21 17:33:58 steve Exp $

# vi: set ai et:
0.32 2021-09-14
- Add ->get_pattern and ->set_pattern.
- https://github.com/shlomif/String-Random/pull/5
- Thanks to https://github.com/ology

0.31 2020-10-17
- dist.ini / weaver.ini / .tidyallrc / etc. cleanup
- Move to @SHLOMIF
- Inspired by Lady_Aleena.

0.30 2018-05-22
- Convert to Dist-Zilla.

0.29 2015-12-24
- Add a dependency on the 'parent' module:
- This caused some CPAN Testers failures on perl-5.8.x.
- http://www.cpantesters.org/cpan/report/d21f0078-6c11-1014-b233-6b3058476d35

0.28 2015-01-22
- Convert Changes to CPAN::Changes and add t/cpan-changes.t .

0.27 2015-01-22
- Cache parsed range patterns.
- Pull Request from Kosuke Asami (co-me). Thanks!
- https://github.com/shlomif/String-Random/pull/1
- Clean up the code according to perlcritic.
- Pull Request from Lance Brown. Thanks!
- https://github.com/shlomif/String-Random/pull/2
- Add rand_gen parameter to new to specify a custom random generator.
- Pull Request from Lance Brown. Thanks!
- https://github.com/shlomif/String-Random/pull/3

0.26 2014-01-31
- LICENSE section and file (CPANTS).
- Minimum version of perl in Build.PL / META.yml .

0.25 2013-12-27
- Update the link to the version control repository.

0.24 2013-12-03
- Add keywords and a link to he repository to Build.PL / META.yml.

0.23 2013-12-03
- Add t/style-trailing-space.t .
- Update the POD in lib/String/Random.pm .
- Add t/pod.t .
- Convert Build.PL to Test::Run::Builder.
- Hopefully fix https://rt.cpan.org/Public/Bug/Display.html?id=86894
- Bug #86894 for String-Random: Spurious warnings

0.22 2006-09-21
- Fix README to reflect current reality.
- Random cleanup in this file.
- Since we've broken compatibility with *really* old Perl5 anyway,
modernize a bit more ("our" instead of "use vars"). Also
explicitly require 5.6.1.

0.21 2006-04-20
- Modify test.pl to use Test::More.
- Build with Module::Build.
- Minor whitespace cleanup.
- Avoid undefined results from randregex() and randpattern().
- Turn on warnings in the module.

0.20 2003-09-29
- Added support for *, +, and ? in regular expressions.

0.1992 2002-07-25
- Added support for {n,m} ranges in regular expressions.
- Cleaned up the initialization of @punct.

0.1991 2002-02-28
- Added a "b" for random binary data in randpattern().

0.199 2002-02-26
- fixed randregex() and randpattern() to Do The Right Thing(TM)
when called in an array or scalar context, and when passed
multiple arguments.
(* WARNING * This is an incompatible change. Code expecting the
behavior of earlier versions may break. Of course, the documentation
warned that this change would be made, and everybody reads
documentation, right? :-)
- fixed use of $_ in randpattern().
(Unfortunately, there's still one use of $_ in a grep(), but I don't
see how that can be avoided, and it only happens once on
initialization.)

0.198 2000-05-16
- fixed \W generating "_"
- reorganized a bit to make it easier to add more patterns
- added \s and \S
- added two-character literals (\t, \n, \r, \f, \a, \e)

0.197 1999-07-10
- moved most of randregex() to %regch
- added random_regex() function interface

0.195 1999-07-07
- regex support is (at least mostly) complete

0.19 1999-07-04
- first pass of regex support

0.1 1998-09-10
- original version
Loading