Bug 41153 - (Follow-up of 40559) Cleanup catalogue/MARCdetail.pl
Summary: (Follow-up of 40559) Cleanup catalogue/MARCdetail.pl
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 40559
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-31 08:49 UTC by Marcel de Rooy
Modified: 2025-10-31 10:16 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41153: Clean up catalogue/MARCdetail.pl (3.26 KB, patch)
2025-10-31 08:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41153: Clean up catalogue/MARCdetail.pl (3.31 KB, patch)
2025-10-31 10:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2025-10-31 08:49:17 UTC
See bug 40559. Moving second patch here.
Comment 1 Marcel de Rooy 2025-10-31 08:51:52 UTC
Created attachment 188767 [details] [review]
Bug 41153: Clean up catalogue/MARCdetail.pl
Comment 2 Marcel de Rooy 2025-10-31 08:55:33 UTC
Copying this here too:

> (In reply to Jonathan Druart from comment #5)
> > Also wondering....
> > 
> >                  next
> >                     if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0]
> > }->{tab} // q{} ) ne
> >                      $tabloop;    # Note: defaulting to '0' changes behavior!
> > 
> > Why?
> 
> Since tabloop can be zero? Or do you mean something else?


The if syntax:
  next if ( $var ) ne $tabloop;
Comment 3 Marcel de Rooy 2025-10-31 10:13:39 UTC
(In reply to Marcel de Rooy from comment #2)
> Copying this here too:
> 
> > (In reply to Jonathan Druart from comment #5)
> > > Also wondering....
> > > 
> > >                  next
> > >                     if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0]
> > > }->{tab} // q{} ) ne
> > >                      $tabloop;    # Note: defaulting to '0' changes behavior!
> > > 
> > > Why?
> > 
> > Since tabloop can be zero? Or do you mean something else?
> 
> 
> The if syntax:
>   next if ( $var ) ne $tabloop;

Still not sure if I understand this question. But here if is a "statement modifier". What follows is handled as an EXPR. So ( $x // '' ) ne $t seems to be a valid expression.
Please clarify if you still mean something else..
Comment 4 Marcel de Rooy 2025-10-31 10:15:47 UTC
Created attachment 188797 [details] [review]
Bug 41153: Clean up catalogue/MARCdetail.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2025-10-31 10:16:34 UTC
Combining SO and QA. This looks more exciting than it is :)