Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value $word #1

Closed
hortocam opened this issue Sep 29, 2014 · 1 comment
Closed

Use of uninitialized value $word #1

hortocam opened this issue Sep 29, 2014 · 1 comment

Comments

@hortocam
Copy link

I'm testing the module and have been using substitution characters. My test script is included in the Gist below.

The module throws this error when processing:

Use of uninitialized value $word in substitution (s///) at /Users/chorton/KomodoProjects/xkpasswd.pm/xkpasswd.pm//XKPasswd.pm line 2329.
Use of uninitialized value $words[4] in join or string at /Users/chorton/KomodoProjects/xkpasswd.pm/xkpasswd.pm//XKPasswd.pm line 1260.

https://gist.github.com/hortocam/d182ed5f5ee0b4d06a31#file-test_xkpasswd-pm-pl

@hortocam
Copy link
Author

This is happening because the iterator in _substitute_characters() is not reduced to account for the zero-based index of the array.

I will submit a pull request with a suggested fix.

hortocam pushed a commit to hortocam/xkpasswd.pm that referenced this issue Sep 29, 2014
fix related to this issue:
bbusschots#1

Updated iterator to reduce the upper bound by 1.  This results in
correct behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants