Summary: | Variables defined as `our` not tidied | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 38664 | ||
Bug Blocks: |
Description
Tomás Cohen Arazi (tcohen)
2025-02-18 12:09:08 UTC
I don't understand, this is not correct: % git show d659526b5ae3363de6dc7691a782a45aaf781a46 -- tools/newHolidays.pl It has been modified by bug 38664. I have also tried: perltidy tools/newHolidays.pl vim tools/newHolidays.pl :%s/our \$/my $ :x git diff diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index 9cca4a9bc97..722f86859f4 100755 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -33,16 +33,16 @@ my $dbh = C4::Context->dbh(); checkauth( $input, 0, { tools => 'edit_calendar' }, 'intranet' ); -our $branchcode = $input->param('newBranchName'); +my $branchcode = $input->param('newBranchName'); my $originalbranchcode = $branchcode; -our $weekday = $input->param('newWeekday'); -our $day = $input->param('newDay'); -our $month = $input->param('newMonth'); -our $year = $input->param('newYear'); +my $weekday = $input->param('newWeekday'); +my $day = $input->param('newDay'); +my $month = $input->param('newMonth'); +my $year = $input->param('newYear'); my $dateofrange = $input->param('dateofrange'); -our $title = $input->param('newTitle'); -our $description = $input->param('newDescription'); -our $newoperation = $input->param('newOperation'); +my $title = $input->param('newTitle'); +my $description = $input->param('newDescription'); +my $newoperation = $input->param('newOperation'); my $allbranches = $input->param('allBranches'); my $first_dt = DateTime->new( year => $year, month => $month, day => $day ); (In reply to Tomás Cohen Arazi (tcohen) from comment #0) > If you look at `tools/newHolidays` you will notice the file is not tidy. > > To reproduce: > 1. Look at `tools/newHolidays` which is clearly not tidy > 2. Run: > $ ktd --shell > k$ perl misc/devel/tidy.pl tools/newHolidays.pl > k$ git diff > => FAIL: No changes! > 3. Replace `our` for `my` on the variable definitions > 4. Repeat 2 > => SUCCESS: The file is correctly tidied now! Or did you mean that the "our" lines were not tidy? And not the whole file. I think it was only the lines with our. |