Find Jobs
Hire Freelancers

CPAN Dependency Tree Project

$30-250 CAD

Completed
Posted over 2 years ago

$30-250 CAD

Paid on delivery
We have provided some sample data in the form of the [login to view URL] files that accompany most Perl libraries uploaded to CPAN. XXXXX for documentation on this format. This data does not contain circular references and you do not need to handle those in your program. For this project, the only important key in this metadata is the prereqs key. The files are located under data/ in a directory tree where each subdirectory corresponds to the name of a Perl distribution, like “DateTime”, "Eval-Closure", or "Module-Runtime". There are also some additional support files under data/. The first is a data/[login to view URL] that maps Perl module names to Perl distribution names. Note that the [login to view URL] files belong to a distribution (distro), but the prereqs themselves always specify individual modules. A distro can contain one or more modules. This means you will need to translate from module names to distro names when you are constructing your dependency tree. All of the files you need are in the data/ directory. You should not need to fetch additional data from CPAN or anywhere else on the Internet. The other is a data/[login to view URL] file. This contains an array of modules which are shipped with the Perl core. Your project requires reading this metadata and producing fully resolved dependency trees. In the metadata, dependencies are defined by phase ("runtime", "test", etc.) and by relationship ("requires", "recommends", "suggests"). We are only interested in "runtime" phase dependencies where the relationship is "requires". You can ignore everything else. The Program You will write a command line program that accepts the following command line arguments: --name - The name of a distribution for which dependencies should be resolved. May be specified more than once. The program should output a single JSON object to stdout. That JSON object should look like this: { "DateTime": { "DateTime-Locale": { "Params-ValidationCompiler": { "..." } } }, "..." } The object's keys are distribution names and the values are in turn objects where the keys are distribution names. You should completely resolve the dependency tree for all runtime prereqs. That means some distros may appear as an object key more than once. If your program is given multiple --name flags you should still produce a single JSON object. Each of the distro names given on the command line should be a top-level key in the JSON object you produce. If a module name (not a distro name) appears in the list of core modules in data/[login to view URL] then you can omit it from the output entirely. You can also ignore version numbers for the purposes of this project. You can also ignore "perl" as a prereq. (This specifies the minimum version of Perl that a distro needs.) If a particular distro has no dependencies, represent it as an empty object in the JSON. Example Output for Testing The Package-Stash distribution has a small dependency tree, consisting of the following: Package-Stash B Carp Dist::CheckConflicts Carp Exporter Module::Runtime perl base perl strict warnings Getopt::Long Module::Implementation Carp Module::Runtime perl Try::Tiny Carp Exporter constant perl strict warnings strict warnings Scalar::Util Symbol constant perl strict warnings This is the entire dependency tree for Package-Stash as modules, not distributions. Note that this example includes both "perl" and modules shipped with the Perl code. The terminal nodes do not have any dependencies of their own. You can use this to evaluate the output of your program.
Project ID: 31689568

About the project

1 proposal
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Already we have discussed...............................................................................
$30 CAD in 1 day
4.9 (35 reviews)
5.4
5.4

About the client

Flag of CANADA
Maple, Canada
0.0
0
Payment method verified
Member since Oct 3, 2021

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.