aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ManaTools/Shared/disk_backend/Part.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/ManaTools/Shared/disk_backend/Part.pm b/lib/ManaTools/Shared/disk_backend/Part.pm
index 85e3cf48..1e26b902 100644
--- a/lib/ManaTools/Shared/disk_backend/Part.pm
+++ b/lib/ManaTools/Shared/disk_backend/Part.pm
@@ -177,6 +177,37 @@ sub label {
#=============================================================
+=head2 is_equal
+
+=head3 INPUT
+
+ $part: ManaTools::Shared::disk_backend::Part
+
+=head3 OUTPUT
+
+ bool
+
+=head3 DESCRIPTION
+
+ this method checks if the given part is equal to self
+
+=cut
+
+#=============================================================
+sub is_equal {
+ my $self = shift;
+ my $part = shift;
+
+ return 0 if ($self->label() ne $part->label());
+ return 0 if ($self->type() ne $part->type());
+ return 0 if (!$self->ins()->is_equal($part->ins()));
+ return 0 if (!$self->outs()->is_equal($part->outs()));
+
+ return 1;
+}
+
+#=============================================================
+
=head2 get_ins
=head3 OUTPUT