You are here: Foswiki>Tasks Web>Item676 (09 Sep 2015, GeorgeClark)Edit Attach

Item676: package Assert; causes namespace collisions

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: major
Applies To: Engine
Component: CodeRefactoring
Branches:
Reported By: JoshuaCharlesCampbell
Waiting For:
Last Change By: GeorgeClark
Using a package named "Assert" instead of "Foswiki::Assert" or other causes it to fly into any other Assert.pm in @INC and explode.

Since this is a pertty generic module name, perhaps it should be namespaced. Note that Assert.pm does include Foswiki-specific code.

Specifically this causes problems when old TWiki /lib/s are lurking in the @INC, presumably because of the nasty ref trickery Assert performs.

This possibly also applies to Monitor and TWiki.
Indeed. Can't do much about TWiki, but Assert, Monitor and Unit should probably be renamed something less generic. I called them that originally because I wanted to release them to CPAN, but gave up on that a long time ago.

Would like to target this for 2.0

-- CrawfordCurrie - 29 Jun 2010

ItemTemplate edit

Summary package Assert; causes namespace collisions
ReportedBy JoshuaCharlesCampbell
Codebase 1.0.0 beta3
SVN Range Foswiki-1.0.0-beta3, Fri, 02 Jan 2009, build 1697
AppliesTo Engine
Component CodeRefactoring
Priority Enhancement
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease major
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r3 - 09 Sep 2015, GeorgeClark
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