Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
"Markus Jansen via RT"  
View profile  
 More options Aug 8 2011, 9:13 am
Newsgroups: perl.par
From: bug-Module-ScanD...@rt.cpan.org ("Markus Jansen via RT")
Date: Mon, 8 Aug 2011 09:13:00 -0400
Subject: [rt.cpan.org #70134] patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute

Mon Aug 08 09:12:58 2011: Request 70134 was acted upon.
Transaction: Ticket created by markus.jan...@ericsson.com
       Queue: Module-ScanDeps
     Subject: patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: markus.jan...@ericsson.com
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70134 >

Hi Roderich, Steffen, and others,

below you find a "-c" diff listing with 2 suggested patches for Module::ScanDeps 1.04.
First, I have found a number of preload rule refinements.
Second, I have added a "used_via_preload" attributed, which greatly helps scrutinizing whether excluding a module
(and implicitly its potentitial dependencies) is safe or not.
Please consider applying the additions (or a refactored version :-) into the next version.

Best regards,
        Markus

diff -c /vobs/cc/CCA-perl01/perl5____________________sixtyfive_char_path/prod/lib/s ite_perl/5.10.1/Module/ScanDeps.pm@@/main/CCA_perl01_perl5_SunOS_sparc_inte gration/LATEST perl5/Module/ScanDeps.pm
*** /vobs/cc/CCA-perl01/perl5____________________sixtyfive_char_path/prod/lib/s ite_perl/5.10.1/Module/ScanDeps.pm@@/main/CCA_perl01_perl5_SunOS_sparc_inte gration/LATEST        Thu Jul 21 10:55:14 2011
--- perl5/Module/ScanDeps.pm    Mon Aug  8 14:37:22 2011
***************
*** 275,280 ****
--- 275,281 ----
                  _glob_in_inc('Date/Manip/Offset', 1));
      },
      'DateTime/Locale.pm' => 'sub',
+     'DateTime/TimeZone.pm' => 'sub',
      'DBI.pm' => sub {
          grep !/\bProxy\b/, _glob_in_inc('DBD', 1);
      },
***************
*** 354,364 ****
--- 355,375 ----
      'Module/Pluggable.pm'           => sub {
          _glob_in_inc('$CurrentPackage/Plugin', 1);
      },
+     'Moose.pm'                      => sub {
+         _glob_in_inc('Moose', 1),
+         _glob_in_inc('Class/MOP', 1),
+     },
+     'MooseX/AttributeHelpers.pm'    => 'sub',
+     'MooseX/POE.pm'                 => sub {
+         _glob_in_inc('MooseX/POE', 1),
+         _glob_in_inc('MooseX/Async', 1),
+     },
      'MIME/Decoder.pm'               => 'sub',
      'Net/DNS/RR.pm'                 => 'sub',
      'Net/FTP.pm'                    => 'sub',
      'Net/Server.pm'                 => 'sub',
      'Net/SSH/Perl.pm'               => 'sub',
+     'Package/Stash.pm'              => 'sub',
      'PAR/Repository.pm'             => 'sub',
      'PAR/Repository/Client.pm'      => 'sub',
      'Perl/Critic.pm'                => 'sub', #not only Perl/Critic/Policy
***************
*** 370,375 ****
--- 381,391 ----
      'POE.pm'                           => [ qw(
          POE/Kernel.pm POE/Session.pm
      ) ],
+     'POE/Component/Client/HTTP.pm'                    => sub {
+         _glob_in_inc('POE/Compoenent/Client/HTTP', 1),
+         'POE/Filter/HTTPChunk.pm',
+         'POE/Filter/HTTPHead.pm',
+     },
      'POE/Kernel.pm'                    => sub {
          _glob_in_inc('POE/XS/Resource', 1),
          _glob_in_inc('POE/Resource', 1),
***************
*** 393,400 ****
          termios.ph asm/termios.ph sys/termiox.ph sys/termios.ph sys/ttycom.ph
      ) ],
      'SOAP/Lite.pm'                  => sub {
!         (($] >= 5.008 ? ('utf8.pm') : ()), _glob_in_inc('SOAP/Transport', 1));
      },
      'SQL/Parser.pm' => sub {
          _glob_in_inc('SQL/Dialects', 1);
      },
--- 409,419 ----
          termios.ph asm/termios.ph sys/termiox.ph sys/termios.ph sys/ttycom.ph
      ) ],
      'SOAP/Lite.pm'                  => sub {
!         (($] >= 5.008 ? ('utf8.pm') : ()),
!        _glob_in_inc('SOAP/Lite/Deserializer', 1),
!        _glob_in_inc('SOAP/Transport', 1));
      },
+     'Socket/GetAddrInfo.pm' => 'sub',
      'SQL/Parser.pm' => sub {
          _glob_in_inc('SQL/Dialects', 1);
      },
***************
*** 649,659 ****
              my $preload = _get_preload($pm) or next;

              add_deps(
!                      used_by => $key,
                       rv      => $args->{rv},
                       modules => $preload,
                       skip    => $args->{skip},
                       warn_missing => $args->{warn_missing},
                   );
          }
      }
--- 668,679 ----
              my $preload = _get_preload($pm) or next;

              add_deps(
!                      used_by => $pm,
                       rv      => $args->{rv},
                       modules => $preload,
                       skip    => $args->{skip},
                       warn_missing => $args->{warn_missing},
+                      used_via_preload => 1,
                   );
          }
      }
***************
*** 949,954 ****
--- 969,975 ----
  sub _add_info {
      my %args = @_;
      my ($rv, $module, $file, $used_by, $type) = @args{qw/rv module file used_by type/};
+     my $used_via_preload = defined $args{used_via_preload} ? $args{used_via_preload} : 0;

      return unless defined($module) and defined($file);

***************
*** 986,994 ****
      };

      if (defined($used_by) and $used_by ne $module) {
!         push @{ $rv->{$module}{used_by} }, $used_by
!           if  ( (!File::Spec->case_tolerant() && !grep { $_ eq $used_by } @{ $rv->{$module}{used_by} })
!              or ( File::Spec->case_tolerant() && !grep { lc($_) eq lc($used_by) } @{ $rv->{$module}{used_by} }));

          # We assume here that another _add_info will be called to provide the other parts of $rv->{$used_by}
          push @{ $rv->{$used_by}{uses} }, $module
--- 1007,1017 ----
      };

      if (defined($used_by) and $used_by ne $module) {
!         if  ( (!File::Spec->case_tolerant() && !grep { $_ eq $used_by } @{ $rv->{$module}{used_by} })
!             or ( File::Spec->case_tolerant() && !grep { lc($_) eq lc($used_by) } @{ $rv->{$module}{used_by} })) {
!           push @{ $rv->{$module}{used_by} }, $used_by;
!           push @{ $rv->{$module}{used_via_preload} }, $used_by if ( $used_via_preload );
!       }

          # We assume here that another _add_info will be called to provide the other parts of $rv->{$used_by}
          push @{ $rv->{$used_by}{uses} }, $module
***************
*** 1007,1012 ****
--- 1030,1036 ----
      my $rv = $args{rv}   || {};
      my $skip = $args{skip} || {};
      my $used_by = $args{used_by};
+     my $used_via_preload = $args{used_via_preload} || 0;

      foreach my $module (@{ $args{modules} }) {
          my $file = _find_in_inc($module)
***************
*** 1016,1022 ****
          if (exists $rv->{$module}) {
              _add_info( rv     => $rv,      module  => $module,
                         file   => $file,    used_by => $used_by,
!                        type   => undef );
              next;
          }

--- 1040,1046 ----
          if (exists $rv->{$module}) {
              _add_info( rv     => $rv,      module  => $module,
                         file   => $file,    used_by => $used_by,
!                        type   => undef,    used_via_preload => $used_via_preload );
              next;
          }

***************
*** 1023,1029 ****
          my $type = _gettype($file);
          _add_info( rv     => $rv,   module  => $module,
                     file   => $file, used_by => $used_by,
!                    type   => $type );

          if ($module =~ /(.*?([^\/]*))\.p[mh]$/i) {
              my ($path, $basename) = ($1, $2);
--- 1047,1053 ----
          my $type = _gettype($file);
          _add_info( rv     => $rv,   module  => $module,
                     file   => $file, used_by => $used_by,
!                    type   => $type, used_via_preload => $used_via_preload );

          if ($module =~ /(.*?([^\/]*))\.p[mh]$/i) {
              my ($path, $basename) = ($1, $2);

Markus Jansen

Ericsson GmbH
Eurolab R&D
Ericsson Allee 1
52134 Herzogenrath, Germany
Phone +49 2407 575 5157
Fax +49 22407 575 150
Mobile +49 172 2742003
markus.jan...@ericsson.com
www.ericsson.com

Ericsson GmbH. Sitz: Düsseldorf. Registergericht: Amtsgericht Düsseldorf, HRB 33012. Geschäftsführer: Stefan Koetz (Vors.), Nils de Baar, Bernd Schmidt. Aufsichtsratsvorsitzender: Anders Runevad.

This Communication is confidential. We only send and receive email on the basis of the terms set out at www.ericsson.com/email_disclaimer<http://www.ericsson.com/email_disclaimer>.

  Picture (Metafile) 1.jpg
1K Download

  Picture (Metafile) 2.jpg
3K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Roderich Schupp via RT"  
View profile  
 More options Feb 21 2012, 11:15 am
Newsgroups: perl.par
From: bug-Module-ScanD...@rt.cpan.org ("Roderich Schupp via RT")
Date: Tue, 21 Feb 2012 11:15:57 -0500
Local: Tues, Feb 21 2012 11:15 am
Subject: [rt.cpan.org #70134] patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute
Tue Feb 21 11:15:42 2012: Request 70134 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: Module-ScanDeps
     Subject: patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: markus.jan...@ericsson.com
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70134 >

On 2011-08-08 09:12:58, markus.jan...@ericsson.com wrote:

> First, I have found a number of preload rule refinements.

Thanks, I've commited these, released as Module::ScanDeps 1.08

> Second, I have added a "used_via_preload" attributed, which greatly

I'm not convinced these is generally useful.

Cheers, Roderich


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Roderich Schupp via RT"  
View profile  
 More options Sep 9 2012, 7:00 am
Newsgroups: perl.par
From: bug-Module-ScanD...@rt.cpan.org ("Roderich Schupp via RT")
Date: Sun, 9 Sep 2012 06:55:47 -0400
Local: Sun, Sep 9 2012 6:55 am
Subject: [rt.cpan.org #70134] patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute
Sun Sep 09 06:55:46 2012: Request 70134 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: Module-ScanDeps
     Subject: patch suggestions for Module::ScanDeps 1.04: additional preload rules, used_via_preload attribute
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: markus.jan...@ericsson.com
      Status: patched
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70134 >

Additional %Preload rules are in 1.09.

Cheers, Roderich


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »