Force Excluding Modules

194 views
Skip to first unread message

Matt Martin

unread,
Aug 31, 2014, 4:26:33 PM8/31/14
to cava-p...@googlegroups.com
Hello All,
 
I am using the "Date::Manip" module in my Perl program.
 
I am only really using the DateCalc() function once or twice in there, but when I run the Scan and Build there are hundreds of the Date::Manip::Offset and Date::Manip::TZ modules being included...
 
Like these:
  01:47:48: Info    : Scanning File: Date::Manip::Offset::off000
  01:47:48: Info    : Scanning File: Date::Manip::Offset::off001
  01:47:48: Info    : Scanning File: Date::Manip::Offset::off002
  01:47:48: Info    : Scanning File: Date::Manip::Offset::off003
  01:47:48: Info    : Scanning File: Date::Manip::Offset::off004
  ................................................................up to "..Offset::off489"......
 
 
I tried adding "Date::Manip::Offset" to the Excluded Modules but when I ran the Scan again, all those modules for Offset were still being included... So just to test I Excluded "Date::Manip::Offset::off004" and it was excluded from the scan...
 
So is it possible to exclude Modules in bulk some how, or do I really need to individually add all 400 of those Modules? I tried to add 4 or 5 of those offset one's at once separating them with commas, but that didn't seem to change anything...
 
Is there anyway to do this?? Any thoughts or suggestions would be much appreciated!
 
Thanks in Advance,
Matt

Arpad Szasz

unread,
Sep 1, 2014, 1:39:27 AM9/1/14
to cava-p...@googlegroups.com
 Hello Matt,

 Didn't test this, but how about adding Date::Manip:: ?


--
You received this message because you are subscribed to the Google Groups "Cava Packager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cava-package...@googlegroups.com.
To post to this group, send email to cava-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/cava-packager.
For more options, visit https://groups.google.com/d/optout.



--
 Cu respect,
 Árpád Szász

Johan Vromans

unread,
Sep 1, 2014, 2:29:38 AM9/1/14
to cava-p...@googlegroups.com
Matt Martin <mrm...@gmail.com> writes:

> Is there anyway to do this?? Any thoughts or suggestions would be much
> appreciated!

Yes, it would be nice if wildcards were possible in inclusion/exclusion
lists.

What I usually do in situations like this, is to copy the main module
(Date::Manip) to my private library, and strip the reference to unwanted
modules.

-- Johan

Matt Martin

unread,
Sep 2, 2014, 12:07:25 PM9/2/14
to cava-p...@googlegroups.com
Hey Árpád, thanks for the reply!
 
Ok, I'll give that a shot as soon as I get a chance... Thanks
 
Thanks Again,
Matt

Matt Martin

unread,
Sep 2, 2014, 12:09:27 PM9/2/14
to cava-p...@googlegroups.com
Hey Johan, thanks for the reply!
 
How would I go about stripping it of its references? Are you saying to copy the Perl Module "Date::Manip" to a private/separate direcotry and then edit the Module somehow?
 
Thanks againf or the reply, much appreciated!
 
Thanks,
Matt

Matt Martin

unread,
Sep 2, 2014, 5:58:20 PM9/2/14
to cava-p...@googlegroups.com
Ok, so I tried adding a "?" to the end of the exclusion(s) but it didn't seem to change anything...
 
I added the line below to the end of my script that uses the Date::Manip Module in order to print out the Modules being used inside my program and it came up with the following below, for the Date::Manip module:
 

use Data::Dumper;

print Dumper \%INC;

 
So the lines above printed out these for the Date::Manip Module:
 
          'Date/Manip/Zones.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Zones.pm',
          'Date/Manip/TZ/amnew_00.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/TZ/amnew_00.pm',
          'Date/Manip/Delta.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Delta.pm',
          'Date/Manip/TZ.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/TZ.pm',
          'Date/Manip.pm' => 'C:/strawberry/perl/site/lib/Date/Manip.pm',
          'Date/Manip/Date.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Date.pm',
          'Date/Manip/Lang/english.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Lang/english.pm',
          'Date/Manip/Base.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Base.pm',
          'Date/Manip/TZ/etgmt00.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/TZ/etgmt00.pm',
          'Date/Manip/TZ_Base.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/TZ_Base.pm',
          'Date/Manip/Obj.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Obj.pm',
          'Date/Manip/DM6.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/DM6.pm',
          'Date/Manip/Recur.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Recur.pm',
          'Date/Manip/Lang/index.pm' => 'C:/strawberry/perl/site/lib/Date/Manip/Lang/index.pm',
 
And when I run the Scan and Build in Cava, I can see it building all of Date::Manip::Offset modules, which there are about 489 of those being included, as well as about 455 from Date::Manip::TZ... So as you can see there are a ton of excess modules getting built with my program.
 
If at all possible I would like to ONLY include just the timezones (*from Date::Manip::TZ) which are for USA timezones since this will never be used outside the US... Is this possible?
 
Johan, do you know how I would do this per your suggestion?
 
Thanks Again,
Matt

Johan Vromans

unread,
Sep 3, 2014, 3:39:23 PM9/3/14
to cava-p...@googlegroups.com
Matt Martin <mrm...@gmail.com> writes:

> Hey Johan, thanks for the reply!
>
> How would I go about stripping it of its references? Are you saying to copy
> the Perl Module *"Date::Manip"* to a private/separate direcotry and then
> edit the Module somehow?

Yes, exactly.

Sometimes its just one or two functions from a (big) module that you
need, and then it is easier to copy just the functions to your own code.

-- Johan

Arpad Szasz

unread,
Sep 4, 2014, 4:39:16 AM9/4/14
to cava-p...@googlegroups.com
 Hello Matt,

 Maybe have a look "Module rules options" [1] in CavaPackager docs.



--
You received this message because you are subscribed to the Google Groups "Cava Packager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cava-package...@googlegroups.com.
To post to this group, send email to cava-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/cava-packager.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages