{"id":17635931,"url":"https://github.com/mohawk2/devel-tracerun","last_synced_at":"2025-03-30T03:43:08.908Z","repository":{"id":56837830,"uuid":"277632182","full_name":"mohawk2/Devel-TraceRun","owner":"mohawk2","description":"Shows all the function calls and returns in a Perl program","archived":false,"fork":false,"pushed_at":"2023-07-30T12:23:54.000Z","size":13,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T06:14:22.688Z","etag":null,"topics":["debugging-tool","perl"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Devel::TraceRun","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohawk2.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-06T19:35:50.000Z","updated_at":"2020-07-10T19:45:59.000Z","dependencies_parsed_at":"2024-10-23T07:50:39.666Z","dependency_job_id":"d3f1d60e-6472-41a5-8fd6-7915a3762749","html_url":"https://github.com/mohawk2/Devel-TraceRun","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"cc7d48b29d9861aad4ea9f1a4fa2301d0ccba02f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FDevel-TraceRun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FDevel-TraceRun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FDevel-TraceRun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FDevel-TraceRun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohawk2","download_url":"https://codeload.github.com/mohawk2/Devel-TraceRun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273515,"owners_count":20750904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging-tool","perl"],"created_at":"2024-10-23T02:24:40.530Z","updated_at":"2025-03-30T03:43:08.884Z","avatar_url":"https://github.com/mohawk2.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nDevel::TraceRun - Shows all the function calls and returns in a Perl program\n\n# PROJECT STATUS\n\n[![CPAN version](https://badge.fury.io/pl/Devel-TraceRun.svg)](https://metacpan.org/pod/Devel::TraceRun)\n\n# SYNOPSIS\n\n    $ perl -d -d:TraceRun -S yourscript\n\n# DESCRIPTION\n\nFiguring out a large system's workings is hard. Figuring out why it's\nnot working, and where it's going wrong, is even harder.\n\nThis tool produces an indented list of all function calls with parameters\n(in a very very concise format) and return values (ditto). It aims to\nminimise diffs between runs of a program that are doing the same thing,\nso that differences stand out.\n\nThe output is on `STDOUT` currently. That may become overridable in\ndue course.\n\n## Example\n\nThis code (from the test - `Thing::func` calls `Thing::func2` which\nreturns \"2nd retval\"):\n\n    use Thing;\n    my $f = sub { Thing::func() };\n    Thing::func([2]); # void\n    my @r = Thing::func([2]);\n    my @r2 = $f-\u003e(\"very long string\", 2, bless {}, 'Thing');\n\nrun with:\n\n    perl -d -d:TraceRun script.pl\n\nproduces on perl 5.8 - 5.14 (output is slightly different from 5.16,\nand again from 5.28):\n\n    main::(script.pl:1)()\n    return()\n    Thing::func(ARRAY)\n      Thing::func2()\n      return()\n    return()\n    Thing::func(ARRAY)\n      Thing::func2()\n      return(2nd retval)\n    return(2nd retval)\n    main entry(very long ,2,Thing)\n      Thing::func()\n        Thing::func2()\n        return(2nd retval)\n      return(2nd retval)\n    return(2nd retval)\n\nNote that in void context, nothing is returned. Also note the `very long\nstring` is truncated to (currently) 10 characters, array- and hash-refs\nare printed just as `ARRAY` and `HASH`, and objects as their classname.\n\nThere is currently no way to change what is printed. One thing that would\nincrease homogeneity across runs would be a way to specify for certain\nfunction-names, which inputs or outputs to mask. Obvious examples where\nthis would help are functions that return the current time, or a random\nnumber, or the port number of an incoming IP connection.\n\nAnother source of output variation is the change in Perl 5.18 to randomise\nthe order hash-keys are returned in. You can overcome this for tracing\npurposes by setting the environment variable `PERL_HASH_SEED` to 0,\nwhich also has the effect of setting `PERL_PERTURB_KEYS` to 0.\n\n## How it works\n\nAs may be discerned from the command line, it uses Perl's debugging\nfunctionality. However, unlike the normal use of that, it is entirely\nnon-interactive. Instead, it replaces `DB::DB` with a no-op, and uses\nthe `DB::sub` hook to report function entries and returns.\n\nThese reports are indented (currently hardcoded to two spaces), nested\naccording to stack depth. It is intended to be completely obvious what\neverything means.\n\n# SEE ALSO\n\n[perldebguts](https://metacpan.org/pod/perldebguts)\n\n# AUTHOR\n\nEd J\n\n# COPYRIGHT AND LICENSE\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohawk2%2Fdevel-tracerun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohawk2%2Fdevel-tracerun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohawk2%2Fdevel-tracerun/lists"}