lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prescott Nasser <geobmx...@hotmail.com>
Subject RE: [Lucene.Net] need some perl help
Date Sat, 19 Mar 2011 23:51:33 GMT

gracias



~Prescott Nasser

prescott.nasser@hotmail.com

650.208.4205






----------------------------------------
> Date: Sat, 19 Mar 2011 16:50:45 -0700
> From: thoward37@gmail.com
> To: lucene-net-dev@lucene.apache.org
> Subject: Re: [Lucene.Net] need some perl help
>
> I have had success asking questions in #asfinfra . Maybe they can explain.
>
> On Saturday, March 19, 2011, Prescott Nasser wrote:
> >
> > 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
> >>
> >>
> >> 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
> >>
> >> 		 	   		  
Mime
View raw message