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

ar: add strict #510

Merged
merged 1 commit into from
Mar 20, 2024
Merged

ar: add strict #510

merged 1 commit into from
Mar 20, 2024

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Mar 20, 2024

  • ar was mostly compliant with strict except for option variables
  • Instead of summing $opt_d, $opt_m etc (which might be undefined), count options using a list
  • Don't access $ARGV[0] if it doesn't exist
  • test1: "perl ar" --> invalid: need a major option to determine mode
  • test2: "perl ar x notfound" --> valid: equivalent to ar -x notfound
  • test3: "perl ar -x -m" --> invalid: -m and -x are not compatible

* ar was mostly compliant with strict except for option variables
* Instead of summing $opt_d, $opt_m etc (which might be undefined), count options using a list
* Don't access $ARGV[0] if it doesn't exist
* test1: "perl ar" --> invalid: need a major option to determine mode
* test2: "perl ar x notfound" --> valid: equivalent to ar -x notfound
* test3: "perl ar -x -m" --> invalid: -m and -x are not compatible
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: ar The ar program labels Mar 20, 2024
@briandfoy briandfoy self-assigned this Mar 20, 2024
@briandfoy briandfoy merged commit 746386b into briandfoy:master Mar 20, 2024
2 checks passed
@briandfoy
Copy link
Owner

changes: improve internals with strict; better option validation

@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Mar 20, 2024
@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: ar The ar program Status: released there is a new release with this fix Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants