You are here: Foswiki>Tasks Web>Item11078 (08 Sep 2011, SvenDowideit)Edit Attach

Item11078: Prefs tests strings for 'isa Meta' - presumably there was a plan, but its not needed anymore?

Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: Preferences
Reported By: SvenDowideit
Waiting For:
Last Change By: SvenDowideit
I'm in the process of redoing Foswiki::Store and the Meta factory code. In the process I noticed the conditional Foswiki::Meta->new, and could not find any code that used _getBackend with an actual topic object.

So I added the (uncommented) ##ASSERT line, and it also didn't trigger

# Get a backend object corresponding to the given $web,$topic
# or Foswiki::Meta object
sub _getBackend {
    my $this       = shift;
    my $metaObject = shift;

    ##ASSERT(not (ref($metaObject) && UNIVERSAL::isa( $metaObject, 'Foswiki::Meta' ))) if DEBUG;

    $metaObject = Foswiki::Meta->new( $this->{session}, $metaObject, @_ )
      unless ref($metaObject) && UNIVERSAL::isa( $metaObject, 'Foswiki::Meta' );
    my $path = $metaObject->getPath();
    unless ( exists $this->{paths}{$path} ) {
        $this->{paths}{$path} =
    return $this->{paths}{$path};

So I'd like to simplify - I will commit soon, and we'll see if anyone notices smile

-- SvenDowideit - 25 Aug 2011

As far as I remember, the ThinPrefs code was created before Foswiki::Meta refactoring and I had to adapt it in order to commit to trunk. Probably I thought this feature would be used, but it wasn't. Feel free to modify wink

-- GilmarSantosJr - 26 Aug 2011


-- SvenDowideit - 08 Sep 2011


ItemTemplate edit

Summary Prefs tests strings for 'isa Meta' - presumably there was a plan, but its not needed anymore?
ReportedBy SvenDowideit
Codebase trunk
SVN Range
AppliesTo Engine
Component Preferences
Priority Normal
CurrentState Closed
Checkins distro:231307d04011
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 08 Sep 2011, SvenDowideit - This page was cached on 26 Apr 2019 - 10:36.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy