Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

How to fork the debugger (GitHub)

by LanX (Saint)
on Jun 06, 2020 at 22:17 UTC ( [id://11117770]=perlquestion: print w/replies, xml ) Need Help??

LanX has asked for the wisdom of the Perl Monks concerning the following question:

Hi I want to fork the debugger and adjust it to my needs such that it supports a REPL and a SHELL mode.

Question: what's the most reasonable version of perl5db.pl to pick for that on github?

update

found this, which looks much better than I remembered it

https://github.com/Perl/perl5/blob/blead/lib/perl5db.pl

But how do I fork one file instead of the whole perl5 project?

Updates
Expanded title and linked "fork" for clarity

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re: How to fork the debugger
by Corion (Patriarch) on Jun 07, 2020 at 06:25 UTC

    You cannot do that.

    I think there are some potential approaches:

    1. Copy perldb.pl into its own directory, and start a fresh git repository with it.
      This way you get a clean directory but lose all connection to the upstream. It is also easy to set up and understand. Importing changes from upstream will likely devolve into manually resolving diffs between bleadperl and your version.
    2. Clone the perl repository and ignore the rest of the files. This way, you can always resynchronize with the changes in Perl, at the cost of also synchronizing a lot of files you don't care about.
    3. Clone and then rewrite the perl git directory using git filter-branch to only transfer the history of perl5db.pl into the new repository. This way you keep all the file history of perl5db.pl and you can also periodically get a fresh version of the perl repository and export the perl5db.pl related patches to rebase your changes on it.
    4. Speak to p5p to spin off perl5db.pl from the core and make the CPAN version (to be released by you) upstream. This allows development to occur outside of the Perl core and the new perl5db.pl will then be periodically be copied into the perl repository.
Re: How to fork the debugger (GitHub)
by $h4X4_|=73}{ (Monk) on Jun 07, 2020 at 13:17 UTC
    You can maybe look into using system(); this may not suite all your needs but it does fork.
    fork is done first and the parent process waits for the child process to exit.
    system perldoc
        He he, thanks. :)

        After I realized the ambiguity of the title I added "(GitHub)" part.

        Funnily it's still misunderstood...

        ¯\_(ツ)_/¯

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        > No, fork, not fork.

        We can do that, we don't even need a reason.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11117770]
Approved by marto
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-16 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found