nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
54 stars 4 forks source link

Crossing mode integration error #82

Closed nkh closed 1 year ago

nkh commented 1 year ago

Integration branch: https://github.com/nkh/P5-App-Asciio/tree/integrate_cross_mode

I have added some debugging output which displays this title "Get crossing mode overlay:" and then the overlay characters. This is the code:

my @overlay_elements = App::Asciio::Cross::get_cross_mode_overlays($self) ;

use Data::TreeDumper ;
print DumpTree \@overlay_elements, "Get crossing mode overlays\n" ;

and this is the error:

*** unhandled exception in callback:
***   Can't use string ("32") as a subroutine ref while "strict refs" in use at /home/nadim/nadim/devel/repositories/perl_modules/P5-App-Asciio/blib/lib/App/Asciio/Cross.pm line 156.
qindapao commented 1 year ago

@nkh

Leave it to me. I think I know what the problem is.You can do something else.

But I can't do it today. It's Saturday.

qindapao commented 1 year ago

@nkh

use List::Util qw(first) ; use List::MoreUtils qw(any);

These two sentences should be added to cross.pm

nkh commented 1 year ago

You let me know when you have a commit that works, I'm working on a ticket from 2016, lol!

qindapao commented 1 year ago

@nkh

https://github.com/qindapao/P5-App-Asciio/tree/cross_mode_refac

https://github.com/qindapao/P5-App-Asciio/commit/f556cf6f0099eae3948946d056747849f7c394df

I'm done, please take a look

qindapao commented 1 year ago

@nkh

It was modified based on yours, I did not use the new commit.

qindapao commented 1 year ago

@nkh

I used the following command git commit --amend

nkh commented 1 year ago

@qindapao, works fine, good job.

It's better to not amend commits in an branch where two or more do work, it makes impossible to see the steps. The one merging can squash instead.

What do you think about having the line crossing mode, I think that's a better name, integrated?

To make it easier to use this mode, it would be nice if you could fix #72, let me know if it is not clear.

qindapao commented 1 year ago

@nkh

Ok, I see, I can use that command in one person's development branch, but it is not suitable for multi-person development branch.

I will modify the name in the next commit.

nkh commented 1 year ago

I have merged into master, I recommend you throw away all your branches that are related to this work (I've just done that), and start anew from master for changes