Bio-Metabolic
view release on metacpan or search on metacpan
lib/Bio/Metabolic/Substrate.pm view on Meta::CPAN
require Exporter;
#use AutoLoader qw(AUTOLOAD);
#use Math::Symbolic;
use Carp;
use overload
"\"\"" => \&substrate_to_string,
"==" => \&equals,
"!=" => \¬_equals,
"cmp" => \&compare_names;
our $VERSION = '0.06';
=head1 METHODS
=head2 Constructor new
First argument must specify the name. Second argument is a hash reference of
key-value pairs defining the object attributes. Attributes are optional.
lib/Bio/Metabolic/Substrate.pm view on Meta::CPAN
my $k;
foreach $k (@sub2_keys) {
return 0 if ( !defined( $sub2->{$k} )
|| $sub2->{$k} ne $sub1->{$k} );
}
return 1;
}
=head2 Method not_equals
Compares two substrates. If one of the substrates has attributes the set of
attributes is compared. If both objects are without attributes, the names are
compared. Returns 0 upon equality, 1 otherwise.
=cut
sub not_equals {
return 1 - equals(@_);
}
=head2 Method is_empty
returns 1 if the object does not have any attributes
=cut
sub is_empty {
( run in 0.288 second using v1.01-cache-2.11-cpan-0a987023a57 )