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

Poor handling of undefined values #8

Open
barefootcoder opened this issue Jun 29, 2016 · 0 comments
Open

Poor handling of undefined values #8

barefootcoder opened this issue Jun 29, 2016 · 0 comments

Comments

@barefootcoder
Copy link
Owner

This:

[cibola:~] perl -MDate::Easy -le 'print datetime(undef)'
Use of uninitialized value $datetime in pattern match (m//) at /home/buddy/perl5/perlbrew/perls/perl-5.14.4/lib/site_perl/5.14.4/Date/Easy/Datetime.pm line 44.
Use of uninitialized value $datetime in concatenation (.) or string at /home/buddy/perl5/perlbrew/perls/perl-5.14.4/lib/site_perl/5.14.4/Date/Easy/Datetime.pm line 52.
Illegal datetime:  at -e line 1.

should be far less noisy. If the arg is undefined, it could short-circuit all the work it's trying to do and just throw an exception immediately.

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

1 participant