[rt-users] Can't locate object method

Jeff Voskamp javoskam at uwaterloo.ca
Mon Sep 20 10:33:26 EDT 2010


  On 09/20/2010 09:57 AM, Jyoti Sahu wrote:
>
> Hello,
>
> I am trying to learn the code of RT to make changes in it as per our 
> requirements. So I tried to duplicate on of its module of creating, 
> editing group.
>
> I have included a new folder as groups1 in /share/html/Admin folder & 
> made a new package as groups1.pm & group1.pm & accordingly .
>
> Everything went fine to some extent but now I am facing one problem as 
> its showing below error when included above changes
>
> *ERROR:*
>
> *error:* Can't locate object method "new" via package "RT::Groups1" 
> (perhaps you forgot to load "RT::Groups1"?) at 
> /opt/rt3/share/html/Admin/Groups1/index.html line 40, <GEN364> line 134.
> *context:*
>
> *...*
>
> 	
>
> *36:*
>
> 	
>
> <div align="right"><input type="submit" class="button" 
> value="<&|/l&>Go!</&>" /></div>
>
> *37:*
>
> 	
>
> </form>
>
> *38:*
>
> 	
>
> *39:*
>
> 	
>
> <%INIT>
>
> *40:*
>
> 	
>
> my $Groups1 = RT::Groups1->new($session{'CurrentUser'});
>
> *41:*
>
> 	
>
> $Groups1->LimitToUserDefinedGroups();
>
> *42:*
>
> 	
>
> my $title = loc('Select a group_newcustomized');
>
> *43:*
>
> 	
>
> my $caption;
>
> *44:*
>
> 	
>
> *...*
>
> 	
>
> *code stack:* /opt/rt3/share/html/Admin/Groups1/index.html:40
> /opt/rt3/share/html/Admin/autohandler:49
> /opt/rt3/share/html/autohandler:315
>
> Can any body help what might be the problem?
>
Line 40 should be

*40:*

	

my $Groups1 = RT::Group->new($session{'CurrentUser'});

RT:Group is the type and $Groups1 is an instance of that type.

Jeff



More information about the rt-users mailing list