• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DrHyde / perl-modules-Data-Transactional / 13091920842

01 Feb 2025 07:56PM CUT coverage: 90.0%. Remained the same
13091920842

Pull #21

github

web-flow
Bump cross-platform-actions/action from 0.26.0 to 0.27.0

Bumps [cross-platform-actions/action](https://github.com/cross-platform-actions/action) from 0.26.0 to 0.27.0.
- [Release notes](https://github.com/cross-platform-actions/action/releases)
- [Changelog](https://github.com/cross-platform-actions/action/blob/master/changelog.md)
- [Commits](https://github.com/cross-platform-actions/action/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: cross-platform-actions/action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #21: Bump cross-platform-actions/action from 0.26.0 to 0.27.0

126 of 140 relevant lines covered (90.0%)

12.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/lib/Data/Compare/Plugins/Data/Transactional.pm
1
package Data::Compare::Plugins::Data::Transactional;
2

3
use strict;
2✔
4
use warnings;
2✔
5

6
use Data::Compare;
2✔
7
use Scalar::Util qw(blessed);
2✔
8

9
our $VERSION = '1.04';
10

11
sub _register {
12
    return
13
    [
14
        ['Data::Transactional', \&_dt_dt_compare],
2✔
15
        ['Data::Transactional', 'ARRAY', \&_dt_notdt_compare],
16
        ['Data::Transactional', 'HASH', \&_dt_notdt_compare],
17
    ];
18
}
19

20
sub _dt_dt_compare {
21
    my($t1, $t2) = @_;
21✔
22
    Compare(_underlying($t1), _underlying($t2));
21✔
23
}
24

25
sub _dt_notdt_compare {
26
    my($dt, $notdt) = @_;
33✔
27
    ($dt, $notdt) = ($notdt, $dt) if(!(blessed($dt) && $dt->isa('Data::Transactional')));
33✔
28
    Compare(_underlying($dt), $notdt);
33✔
29
}
30

31
sub _underlying {
32
    my $tied = shift;
75✔
33
    return $tied->current_state();
75✔
34
}
35

36
_register();
37

38
=head1 NAME
39

40
Data::Compare::Plugin::Data::Transactional - plugin for Data::Compare to
41
handle Data::Transactional objects.
42

43
=head1 DESCRIPTION
44

45
Enables Data::Compare to Do The Right Thing for Data::Transactional
46
objects.
47

48
=over
49

50
=item comparing a Data::Transactional object to another Data::Transactional object
51

52
If you compare two Data::Transactional objects, they compare equal if
53
their *current* values are the same.  We never look at any checkpoints
54
that may be stored.
55

56
=item comparing a Data::Transactional object to an ordinary array or hash
57

58
These will be considered the same if they have the same current contents -
59
again, checkpoints are ignored.
60

61
=back
62

63
=head1 AUTHOR
64

65
Copyright (c) 2004 David Cantrell. All rights reserved.
66
This program is free software; you can redistribute it and/or
67
modify it under the same terms as Perl itself.
68

69
=head1 SEE ALSO
70

71
L<Data::Compare>
72

73
L<Data::Transactional>
74

75
=cut
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc