in reply to Re^2: locating ultima thule
in thread locating ultima thule
Path::Tiny paths require defined, positive-length parts
AFAICT that means that one of the paths involved in the operation was either undef or had zero length. It'd be best if you dump the elements of the paths involved, in this case I guess that'd be $vars{to_images} and $AoA[$i][0], and if you're unsure as to what's causing the problem, show the output here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: locating ultima thule
by Aldebaran (Curate) on Jan 06, 2019 at 09:16 UTC | |
I did figure out what is going wrong, but I don't know how to fix it. Let me start by showing the tail end of the page creation process, where this thing is going off the rails:
The offenders are create_page and put_page, who until recently, were part of main. Relegating them to be subroutines was great for legibility in main, but I seem to have developed issues. First of all, even though it tells me it fails every time, it gets a page on the net. The resulting page is weirdly-populated. ugly page Read more... (4 kB)
My main data struture is a hash that I pass into all my subroutines:
But then I want to create something with persistence, like:
and then
$ref_content's value is NULL, so this is not an effective pass.
It didn't always used to be this broken, so I'm happy to entertain suggestions.... | [reply] [d/l] [select] |
by haukex (Archbishop) on Jan 06, 2019 at 09:43 UTC | |
Ok, you've confirmed that $vars{refc}[$i][0] is undef, but as I said, please use Data::Dumper (or Data::Dump) to show the contents of $vars{refc}. Probably the data structure that get_content is returning doesn't match what you're doing with it in put_page. | [reply] [d/l] [select] |
by Aldebaran (Curate) on Jan 08, 2019 at 08:03 UTC | |
What it showed was that the content was populated. What was causing the entire template to go wonky was that there were more files in rus_captions than in eng_captions or images. I filled undefined things with bubble gum and just got them on the net. Most of the complaining is about not being able to sftp non-existent files. I wanted to come up with some baseline defaults so that the whole page doesn't go down for lack of an image to stand in for a while. I've gotten rid of a lot of mistakes as I dug my way back into this one. The first was not having brackets around my qw in the initialization of the array:
I don't see a way to use Dumper and have that the be cyrillic, because that's what I want to see. I use Dumper for doing anything to get on the scoreboard. (Not such a high price, except that you condemn yourself to read a lot of your own data: uggh) I've been trying to write a better print_aoa_utf8 but have only partial success. Partially, my data set needed more conditioning. The hardest thing for me to represent like this is a space. in make russian xword------ elt 0 0 is й elt 0 1 is elt 0 2 is elt 0 3 is л elt 0 4 is elt 0 5 is elt 0 6 is с elt 0 7 is elt 0 8 is elt 1 0 is о elt 1 1 is б elt 1 2 is л elt 1 3 is о elt 1 4 is м elt 1 5 is о elt 1 6 is в elt 1 7 is ' elt 1 8 is ' elt 1 9 is ш elt 2 0 is 1 elt 2 1 is 2 elt 2 2 is 3 elt 2 3 is 4 elt 2 4 is 5 elt 2 5 is 6 elt 2 6 is 7 elt 2 7 is 8 elt 2 8 is 9 return1 is nothing nyet What I have is:
With my difficulties getting any values initialized. I wonder how I might make it a matter of course and think that a toolkit solution would be a reasonable goal, in particular because I want to have a means for considering fonts, and we saw a tk version of trying out different fonts not long ago. I had to make sure that all previous russian captions were erased before I went and got more:
STDOUT then shows:
And I figured all this out by looking at the data as haukex suggested. I've had a nice few days coding that reduces the ugly, but not completely.
Does the 3rd line here do anything for me or the program?
What I'm reaching for at the end is a control that will go over the array, which can be seen as a column vector of row vectors. I want to iterate over the columns and print out one row at time, with no spaces and a newline at the end. Fishing for notation as to how to do that. With the output as a series of outputs of row vectors, then I think it will fit in well with the Path::Tiny method call append_utf8(@data). Then we can see how these things look on the net. Right now, it's looking pretty stable: crossword prototype shaping up. Again, very grateful for comments, | [reply] [d/l] [select] |
by haukex (Archbishop) on Jan 08, 2019 at 09:01 UTC | |
by Aldebaran (Curate) on Jan 09, 2019 at 01:56 UTC | |
by Anonymous Monk on Jan 08, 2019 at 08:37 UTC | |