Skip to content
Snippets Groups Projects
Commit 7d02c5a8 authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

Enforce weak references to context in all Moose attributes. Default behaviour...

Enforce weak references to context in all Moose attributes. Default behaviour counteracts use of weaken elsewhere.
parent 76a4caf7
Branches release/83.1
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ use Scalar::Util qw/weaken/;
extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
my ($self, $c, @args) = @_;
......
......@@ -26,7 +26,7 @@ extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
has 'long_lookup' => (isa => 'Bool', is => 'ro', builder => 'build_long_lookup');
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
my ($self, $c, @args) = @_;
......
......@@ -27,7 +27,7 @@ extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
# Per instance variables
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
my %allowed_values = (
mask => { map { $_, 1} qw(soft hard) },
......
......@@ -24,7 +24,7 @@ extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
my ($self, $c, @args) = @_;
......
......@@ -31,7 +31,7 @@ with 'Catalyst::Component::InstancePerContext';
has 'lookup_model' => ( is => 'ro', isa => 'Str', required => 1, default => 'DatabaseIDLookup' );
# Per instance variables
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
my ($self, $c, @args) = @_;
......
......@@ -43,7 +43,7 @@ has 'allowed_translation_features' => ( isa => 'HashRef', is => 'ro', lazy => 1,
};
});
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
with 'Catalyst::Component::InstancePerContext', 'EnsEMBL::REST::Role::Content';
......
......@@ -26,7 +26,7 @@ extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
my ($self, $c, @args) = @_;
......
......@@ -25,7 +25,7 @@ extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
my ($self, $c, @args) = @_;
......
......@@ -26,7 +26,7 @@ use Bio::EnsEMBL::Variation::DBSQL::VCFCollectionAdaptor;
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
......
......@@ -26,7 +26,7 @@ use Bio::EnsEMBL::Variation::DBSQL::VCFCollectionAdaptor;
use Bio::EnsEMBL::IO::Parser::VCF4Tabix;
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
......
......@@ -27,7 +27,7 @@ use Bio::EnsEMBL::Variation::DBSQL::VCFCollectionAdaptor;
with 'Catalyst::Component::InstancePerContext';
has 'context' => (is => 'ro');
has 'context' => (is => 'ro', weak_ref => 1);
sub build_per_context_instance {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment