return undef;
}
-sub has_lost_symbols {
- my ($self, $ref) = @_;
- foreach my $soname (keys %{$self->{objects}}) {
- my $mysyms = $self->{objects}{$soname}{syms};
- next if not exists $ref->{objects}{$soname};
- my $refsyms = $ref->{objects}{$soname}{syms};
- foreach my $sym (grep { not $refsyms->{$_}{deprecated} }
- keys %{$refsyms})
- {
- if ((not exists $mysyms->{$sym}) or
- $mysyms->{$sym}{deprecated})
- {
- return 1;
- }
- }
- }
- return 0;
-}
-
sub has_new_symbols {
my ($self, $ref) = @_;
foreach my $soname (keys %{$self->{objects}}) {
return 0;
}
+sub has_lost_symbols {
+ my ($self, $ref) = @_;
+ return $ref->has_new_symbols($self);
+}
+
+
sub has_new_libs {
my ($self, $ref) = @_;
foreach my $soname (keys %{$self->{objects}}) {
sub has_lost_libs {
my ($self, $ref) = @_;
- foreach my $soname (keys %{$ref->{objects}}) {
- return 1 if not exists $self->{objects}{$soname};
- }
- return 0;
+ return $ref->has_new_libs($self);
}
1;
my $save_file = new File::Temp;
-$sym_file->save($save_file);
+$sym_file->save($save_file->filename);
-$sym_file_dup->load($save_file);
+$sym_file_dup->load($save_file->filename);
$sym_file_dup->{file} = "t/200_Dpkg_Shlibs/symbol_file.tmp";
is_deeply($sym_file_dup, $sym_file, 'save -> load' );