Collections don't check that it exists so all setting it in the constructor does is waste memory. Documenting its existence there is enough.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/ObjectModel/Collection.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm index 4e7a032a3..63d470bbc 100644 --- a/testbot/lib/ObjectModel/Collection.pm +++ b/testbot/lib/ObjectModel/Collection.pm @@ -93,7 +93,8 @@ sub new($$$$$;$$@) MasterKey => ComputeMasterKey($MasterColValues), # Filter => undef by default AllScopeItems => $AllScopeItems || {}, - Items => undef}; + # Items => undef by default + }; if ($AllScopeItems) { # Avoid memory cycles in case Items have Detailref properties: @@ -138,7 +139,8 @@ sub Clone($) MasterKey => $self->{MasterKey}, # Filter => undef by default AllScopeItems => $self->{AllScopeItems}, - Items => undef}; + # Items => undef by default + }; # See Collection::new() weaken($Copy->{AllScopeItems});