{"id":19953653,"url":"https://github.com/mkende/perl-eval-safe","last_synced_at":"2026-05-10T02:00:55.669Z","repository":{"id":59149828,"uuid":"210458177","full_name":"mkende/perl-eval-safe","owner":"mkende","description":"Simplified safe evaluation of Perl code","archived":false,"fork":false,"pushed_at":"2020-09-01T10:09:22.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T06:28:30.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkende.png","metadata":{"files":{"readme":"README.pod","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-23T21:44:41.000Z","updated_at":"2019-09-28T23:34:32.000Z","dependencies_parsed_at":"2022-09-15T18:41:16.526Z","dependency_job_id":null,"html_url":"https://github.com/mkende/perl-eval-safe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkende%2Fperl-eval-safe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkende%2Fperl-eval-safe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkende%2Fperl-eval-safe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkende%2Fperl-eval-safe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkende","download_url":"https://codeload.github.com/mkende/perl-eval-safe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241382543,"owners_count":19953952,"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":[],"created_at":"2024-11-13T01:17:10.988Z","updated_at":"2026-05-10T02:00:55.635Z","avatar_url":"https://github.com/mkende.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=head1 Eval::Safe - Simplified safe evaluation of Perl code\n\n=head2 DESCRIPTION\n\nB\u003cEval::Safe\u003e is a Perl module to allow executing Perl code like with the\nB\u003ceval\u003e function, but in isolation from the main program. This is similar to the\nL\u003cSafe\u003e module, but faster, as we don't try to be safe.\n\n=head2 DOCUMENTATION\n\nThe standard L\u003cSafe\u003e module does 4 things when running user-provided code:\ncompiling and running the string as Perl code; running the code in a specific\npackage so that variables in the calling code are not modified by mistake;\nhiding all the existing packages so that the executed code cannot modify them;\nand limiting the set of operations that can be executed by the code to further\ntry to make it safe (prevents it from modifying the system, etc.).\n\nBy comparison, the B\u003cEval::Safe\u003e module here only does the first two of these\nthings (compiling the code and changing the namespace in which it is executed)\nto make it conveniant to run user-provided code, as long as you can trust that\ncode. The benefit is that this is around three times faster than using L\u003cSafe\u003e\n(especially for small pieces of code).\n\nThe documentation for the module can be found on L\u003cmeta::cpan|Eval::Safe\u003e.\nAfter the module is installed, you can also get its documentation by running\nB\u003cperldoc Eval::Safe\u003e (this usually comes in a B\u003cperl-doc\u003e package on most\nsystems).\n\n=head2 INSTALLATION\n\n=head3 Requirements\n\nBuilding and installing this module only requires Perl modules from the\nstandard library. So as long as you have Perl installed (which should be the\ncase by default on almost all system), you should be able to install it using\none of the method below. This module requires Perl version 5.22 or above. You\ncan check which Perl you have installed with the following command:\n\n    perl -v\n\n=head3 Installing from the Git sources\n\nTo install this module manually from Git, you can run the following commands\n(you do need to have the B\u003cmake\u003e and B\u003cgit\u003e program installed):\n\n    git clone https://github.com/mkende/perl-eval-safe.git\n    cd perl-eval-safe\n    perl Makefile.PL\n    make\n    make test\n    sudo make install\n\n=head3 Installing from CPAN\n\nThis module is available on CPAN (the Perl package manager). The CPAN command\nshould be installed on any system that has Perl (which, again, should mostly be\nany system at all). So, to install the module automatically using CPAN, you can \njust run the following command:\n\n    cpan Eval::Safe\n\nNote: if this is the first time that you run the B\u003ccpan\u003e command, you will be\nasked to configure it. The default answer to most questions is usually fine.\n\n=head2 DISTRIBUTION\n\nThe main development of this software is done on\nL\u003cGitHub|https://github.com/mkende/perl-eval-safe\u003e. However, it is also\navailable on CPAN.\n\nThe following can be used only by the module maintainer on CPAN. To update the\nCPAN module, remember to increment the version number and then run the following\ncommands:\n\n    perl Makefile.PL\n    make distcheck\n    # Optionally, to add files not in the manifest:\n    # make manifest\n    make dist\n\nFinally, upload the F\u003cEval-Safe-I\u003cversion\u003e.tar.gz\u003e file that has been created\nthrough L\u003cPAUSE|https://pause.perl.org\u003e, ideally putting it under an\nF\u003cEval-Safe\u003e directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkende%2Fperl-eval-safe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkende%2Fperl-eval-safe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkende%2Fperl-eval-safe/lists"}