Koha-clms/Koha/Edifact
Martin Renvoize ac266cad8b
Bug 40386: Remove warnings from EDI when running tests
This patch fixes several warnings that occur when running Edifact tests:

1. Changed `my $self = ()` to `my $self = {}` in Koha::Edifact constructor
   to properly initialize as hashref instead of empty list
2. Added null/empty checks in Koha::Edifact::Segment::_parse_seg() to prevent
   warnings when processing undefined or empty segments
3. Added null/empty checks in Koha::Edifact::Segment::_get_elements() to
   handle undefined segments gracefully
4. Added Test::NoWarnings to t/Edifact.t to catch any remaining warnings

These changes eliminate "Use of uninitialized value" warnings and ensure
clean test runs without affecting EDI functionality.

Test plan:
1. Run prove t/Edifact.t and verify no warnings are displayed
2. Test EDI message processing to ensure no regression

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-23 16:36:33 -06:00
..
File Bug 38689: Add Koha::Edifact::File::Error(s) classes 2025-02-21 16:41:19 +01:00
File.pm Bug 38689: Add Koha::Edifact::File::Error(s) classes 2025-02-21 16:41:19 +01:00
Files.pm Bug 30070: Add fetch endpoint for EDI Files 2024-01-17 11:38:53 +01:00
Line.pm Bug 39325: (QA follow-up) Adjust some issues 2025-04-28 18:51:30 +02:00
Message.pm Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Order.pm Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Segment.pm Bug 40386: Remove warnings from EDI when running tests 2025-07-23 16:36:33 -06:00
Transport.pm Bug 39904: (QA follow-up) Fix a few other cases 2025-05-19 09:49:42 +02:00