Bio-MUST-Core

 view release on metacpan or  search on metacpan

lib/Bio/MUST/Core/SeqId.pm  view on Meta::CPAN

13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
    # TODO: check if this optimized way always work for us
    my $key = $args{full_id};
 
    # return the existing instance
    return $instance_for{$key} if defined $instance_for{$key};
 
    # create a new instance
    my $instance = $class->new(%args);
    $instance_for{$key} = $instance;
    # Note: do not weaken reference or this will defeat the purpose.
    # However, this could lead to memory leak in some extreme cases.
    # Scalar::Util::weaken $instance_for{$key};
 
    return $instance;
}
 
 
# class methods to build modern MUST-compliant id from NCBI components
 
 
sub new_with {                              ## no critic (RequireArgUnpacking)
    my $class = shift;



( run in 2.467 seconds using v1.01-cache-2.11-cpan-a9ef4e587e4 )