Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Standard Modules

by grantm (Parson)
on Mar 21, 2005 at 01:53 UTC ( [id://441100]=note: print w/replies, xml ) Need Help??


in reply to Standard Modules

This page (warning it's huge) lists all CPAN distributions and marks the ones bundled with ActivePerl as 'CORE'. This is a misleading label since some are core (come in the Perl distribution) and the rest are added by ActiveState.

I grabbed a local copy using wget then ran this script to extract the names of all the distributions marked 'CORE' and then use Richard Clamp's Module::CoreList to filter out the ones that really are core:

#!/usr/bin/perl -w use strict; use XML::LibXML; use Module::CoreList; my $parser = XML::LibXML->new(); $parser->recover(1); my $dom = $parser->parse_html_file('activeperl_ppm_status.html') or die "parse error"; foreach ( $dom->findnodes('//tr[./td[3]/text() = "CORE"]/td[1]/text()' +) ) { my $dist = $_->to_literal; $dist =~ s/-/::/g; next if Module::CoreList->first_release($dist); print $dist, "\n"; }

Which returned this list:

Archive::Tar
Compress::Zlib
Data::Dump
Digest::HMAC
Digest::MD2
Digest::MD4
Digest::SHA1
File::CounterFile
Font::AFM
HTML::Parser
HTML::Tagset
HTML::Tree
IO::Zlib
libwin32
libwww::perl
MD5
Scalar::List::Utils
SOAP::Lite
Tk
URI
Win32::OLE
Win32::Sound
Win32::TieRegistry
Win32API::File
XML::Parser
XML::Simple

Update: added the s/-/::/g line to fix the list filtering.

Replies are listed 'Best First'.
Re^2: Standard Modules
by Anonymous Monk on Mar 21, 2005 at 02:54 UTC
    Thanks grantm but this doesn't really give me what i'm looking for either. The closest i've got so far has been by comparing the modules to the html pages supplied by Activestate:
    my $file; my $module; my @installed; my %installed; my @standard; my %standard; my @non_standard; my @INC_html = @INC; map {s/perl/perl\/html/i;} @INC_html; # Find all '.html' suffixed files in paths contained in the array @INC +_html find( sub { push @standard, $File::Find::name if -f _ && /\.html$/ },@ +INC_html); foreach $file (@standard) { $file =~ /(.*lib\/)(.*)(\.html)/; $file = $2; $file =~ s/\//::/g; } # Find all '.pm' suffixed files in paths contained in the array @INC find( sub { push @installed, $File::Find::name if -f _ && /\.pm$/ },@I +NC); foreach $file (@installed) { $file =~ /(.*lib\/)(.*)(\.pm)/; $file = $2; $file =~ s/\//::/g; } # Build a look-up table (Hash) for the standard modules @standard{@standard} = (1) x @standard; # Look-up standard and non-standard modules foreach $module (@installed) { unless(exists $standard{$module}) { push @non_standard,$module; } }
    Unfortuantely ActiveState do not provide an html page for every module that they supply in the Perl bundle.

    Looks like i may have to do a fresh install on another machine to get the unadulterated module listing.

    Marv.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://441100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-19 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found