I added the fix to check if path is null - now of course when updating via the 
cms javascript on hte site, the path is null, so the tagline gets set to the 
default of Lucene.Net.
 
Not quite sure how to trouble shoot this
 





----------------------------------------
> From: geobmx...@hotmail.com
> To: lucene-net-dev@lucene.apache.org
> Date: Sat, 19 Mar 2011 15:38:45 -0700
> Subject: [Lucene.Net] need some perl help
>
>
> Alright, any perl experts - I've been doing some binging and can't quite 
> figure this out..
>
>
> We have this function:
>
>
> sub basic {
> my %args = @_;
> my $filepath = "content$args{path}";
> read_text_file($filepath, \%args);
> $args{path} =~ s/\.mdtext$/\.html/;
> $args{breadcrumbs} = _breadcrumbs($args{path});
> $args{tagline} = _tagline($args{path});
> my $template_path = "templates/$args{template}";
> my $rendered = Dotiac::DTL->new($template_path)->render(\%args);
> return ($rendered, 'html', \%args);
> }
>
> and then following is part of _tagline:
>
>
> sub _tagline {
> my $file = basename($_);
>
> Occasionally, $_ is empty, which means basename($_) throws an error - 
> specifically when editing .mdtext files via the asf cms process. This 
> obviously poses an issue when compiling. I'm not sure how to account for 
> this. Why would %args{path} be empty? I could just do a check in _tagline to 
> say if $_ is empty then $file = "", which would work, but I'm concerned about 
> why this is empty in the first place
>
> Thanks for any help
> ~P
>
>                                         

Reply via email to