Diab Jerius avatar Diab Jerius committed f228e09

output information on matching profile

Comments (0)

Files changed (1)

       # matched! use the newly parsed topic path if necessary
       if ( $match )
       {
+	  info "Matched profile: ", $config->profile, "\n";
 	  $topic_path = $rpath unless defined $topic_path;
       }
 
 	    # reject unless the entire profile URI is matched
 	    next unless $nmatch == @psegs;
 
-	    push @matches, [ $nmatch, $profile ]
+	    push @matches, [ $nmatch, $name, $profile ]
 	}
 
 	if ( @matches )
 	{
 	    # choose the profile with the most matching segments
 	    ( $match ) = sort { $b->[0] <=> $a->[0] } @matches;
-	    $self->{default} = $match->[1];
+	    ( $self->{profile}, $self->{default} ) = @{$match}[1,2];
 
 	    # create a path from the residual non-matched path segments
 	    $rpath = join('/', @segs[$match->[0]..@segs-1]);
 	return ( defined $match, $rpath );
     }
 
+    sub profile { $_[0]->{profile} }
+
     sub set_profile {
 
 	my ( $self, $profile ) = @_;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.