The Purpose of the Precious Swich in PPM3 (Newbie)

  • Thread starter Veli-Pekka Tätilä
  • Start date
V

Veli-Pekka Tätilä

Hi,
I really like PPM because it makes trying out pacages a breeze. I ran Linux
for a while and tend to think of PPM as the Perl equivalent of apt-get. BOth
get the job done with minimal user-involvement which is mostly about choices
which I'd rather leave to someone else.

One aspect of PPM I have just recently gotten into is updating packages with
the upgrade command. But I'm puzzled as to what the -precious switch in ppm3
actually does. Put another way, which packages might get updated that
otherwise are not when you run upgrade -install -precious?

As I have happily downloaded and used a number of PPM packages and things
still work fine, I thought I'd ask before I try the precious swich. I've
noticed that doing something you don't understand can be quite risky in
computing, especially in programming. My reasoning is as follows: if the
precious switch is totally safe or recommended, it would be on by default.
So I'd better leav it alone until I know more.

I've looked at the PPM built-in docs which give a rather circular
definition:
Quote:
There are several modifiers to the upgrade command:

-install
Installs, rather than lists, available upgrades

-precious
Allows upgrading of "precious" packages
<snip>
End of quote.

I've checked various Perl FAQs, Active State's Using PPM page and Googled
the Web and news with words like ppm3 perl and precious. I even had a quick
glance at the ppm3-bin source but still feel I'm no wiser.

If I were to guess, I'd say that some packages are marked as precious and
considered to be part of core Perl. But is this list version dependent and
should I really update these packages, in order to fix bugs, make it faster
or add some new functionality? I wouldn't want to use packages that are
considered to be in testing or unstable to borrow some apt-get terminology.
I reckon the Perl interpreter itself is not updated via ppm at any rate, is
it?

I'm runing Windows XP Pro SP2 and Active State Perl 5.8.6.
Is the only way of updating the Perl interpreter to install the latest
Active State Perl distro over the current one?

On a silly side-note, I guess it is just me, but when-ever I hear the word
precious spoken by my current speech synth, I cannot help thinking of how
Gollum says it in LOTR, oh well. The fact that I'm not a native English
Speaker, like LOTR, and rarely use the word precious myself might affect
matters, though. But this is certainly not the only LOTr reference, though
likely unintentional, that I've seen used about Unix-like things.
 
S

Sisyphus

..
..
-precious
Allows upgrading of "precious" packages

This was bound to happen when they let Joseph Heller start writing the docs
:)

I couldn't find any sane documentation of "-precious" anywhere, but since
it's a switch for handling precious packages, then I would think that you
could not get into trouble by invoking it. Surely the worst thing that will
happen is that you'll get a message saying something like "Hey, dummy -
there's nothing precious about *this* package!!!".

Cheers,
Rob
 
V

Veli-Pekka Tätilä

Sisyphus said:
This was bound to happen when they let Joseph Heller start writing the
docs :)
Hehe, well that can happen, occasionnally. Writing good docs is actually
pretty difficult. It's gone the other way round for me, people thought I was
too verbose and elaborate. Though not in Perl, I've also seen funny SDK docs
saying something like "I cannot test this right now as I'm not running a
Mac".
the worst thing that will happen is that you'll get a message saying
something like "Hey, dummy - there's nothing precious about *this*
package!!!".
Haha, you might be right. Well I guess the only way to find out is trying
it, which I'll do right now:
I've made a copy of my Perl directory and typed in PPM3:
ppm> upgrade -install -precious
Acme-Brainfuck 1.1.1: up to date.
Acme-Pythonic 0.45: up to date.
Acme-Rant 0.1: up to date.
Acme-Turing 0.01: up to date.
Archive-Zip 1.16: up to date.
Class-Accessor 0.22: up to date.
Class-Accessor-Chained 0.01: up to date.
Class-Data-Inheritable 0.04: up to date.
Class-Trigger 0.08: new version 0.10 available in ActiveState Package
Repository

Class-Trigger 0.08: new version 0.09 available in ActiveState PPM2
Repository

Note: Class-Trigger version 0.08 is available from more than one place.
Which repository would you like to upgrade from?

1. ActiveState Package Repository
2. ActiveState PPM2 Repository

Repository? [ActiveState PPM2 Repository] u1

At this point the process seemed to lock up. I waited about a minute and
gave up. I'm on VDSL here so speed should not be an issue. Maybe that rep
didn't have the package at all.

Then I tried again and selected the second rep on the list. It started
downloading stuff almost instantly. Regarding the output listing I've
snipped the beginning which is the same and leaved in even the packages that
are up-to-date, as ppm may check some more exotic packages.

Repository? [ActiveState PPM2 Repository] 2
====================
Upgrade 'Class-Trigger' version 0.09 in ActivePerl 5.8.6.811.
====================
Downloaded 4134 bytes.
Extracting 5/5: blib/arch/auto/Class/Trigger/.exists
Installing C:\Perl\html\site\lib\Class\Trigger.html
Installing C:\Perl\site\lib\Class\Trigger.pm
Successfully upgraded Class-Trigger version 0.09 in ActivePerl 5.8.6.811.
Data-Dump 1.06: up to date.
Data-Lazy 0.5: up to date.
Data-Page 2.00: up to date.
File-Slurp 9999.09: up to date.
IO-Socket-SSL 0.94: up to date.
IO-String 1.06: new version 1.07 available in ActiveState Package Repository
====================
Upgrade 'IO-String' version 1.06 in ActivePerl 5.8.6.811.
====================
Downloaded 5272 bytes.
Extracting 5/5: blib/arch/auto/IO/String/.exists
Installing C:\Perl\html\site\lib\IO\String.html
Installing C:\Perl\site\lib\IO\String.pm
Successfully upgraded IO-String version 1.06 in ActivePerl 5.8.6.811.
IO-Zlib 1.04: up to date.
IO-stringy 2.110: up to date.
Math-BooleanEval 1.00: up to date.
Module-ScanDeps 0.51: up to date.
Net-SSH 0.08: up to date.
PAR-Dist 0.07: up to date.
Parse-Binary 0.09: up to date.
Regexp-Common 2.120: up to date.
Regexp-English 0.21: up to date.
Tcl 0.88: up to date.
Test-Exception 0.21: up to date.
Test-Manifest 1.14: up to date.
Test-Simple 0.62: up to date.
Text-CSV-Simple 1.00: up to date.
Text-CSV_XS 0.23: up to date.
Tkx 1.02: up to date.
WWW-OpenSearch 0.02: new version 0.03 available in ActiveState Package
Repositor
y
====================
Upgrade 'WWW-OpenSearch' version 0.02 in ActivePerl 5.8.6.811.
====================
Downloaded 2409 bytes.
Extracting 5/5: blib/arch/auto/WWW/OpenSearch/.exists
Successfully upgraded WWW-OpenSearch version 0.02 in ActivePerl 5.8.6.811.
Win32-API 0.41: up to date.
Win32-AbsPath 1.0: up to date.
Win32-ActAcc 1.0: up to date.
Win32-Autoglob 1.01: up to date.
Win32-Console-ANSI 0.07: up to date.
Win32-EventLog-Carp 1.21: up to date.
Win32-Exe 0.08: up to date.
Win32-FileOp 0.14.1: up to date.
Win32-GUI 1.02: up to date.
Win32-GUI-XMLBuilder 0.34: up to date.
Win32-GuiTest 1.3: up to date.
Win32-Hardlink 0.02: up to date.
Win32-Locale 0.04: up to date.
Win32-MCI-Basic 0.01: up to date.
Win32-MIDI-0 2.0: up to date.
Win32-MSAgent 0.04: up to date.
Win32-MachineInfo 0.05: up to date.
Win32-OLE 0.1403: up to date.
Win32-SAPI4 0.08: up to date.
Win32-SoundRec 0.02: up to date.
Win32-Symlink 0.04: up to date.
Win32-SystemInfo 0.08: up to date.
Win32-TieRegistry 0.24: up to date.
Win32-Wallpaper 0.03: up to date.
XML-RSS 1.05: up to date.
XML-Twig 3.22: up to date.
libwin32 0.24: up to date.

I think the big question is, does this list include packages that won't
normally get updated?

By the way, I ran the upgrade command without the precious switch yesterday,
so that's why something like Win32::OLE is not updated at this time.
 
B

Bob Walton

....
Well, I played around a bit, and the only "precious" package in
my copy of Perl was "libwww-perl". It wouldn't upgrade without
using the -precious switch.
 
S

Sisyphus

..
..
...
Well, I played around a bit, and the only "precious" package in
my copy of Perl was "libwww-perl". It wouldn't upgrade without
using the -precious switch.

Not sure, but I *think* there are some modules in libwww-perl that ppm
actually uses. Could it be that "precious" simply means "used by ppm" ?
Could it also be that without the "-precious" switch, the upgrade won't take
place because the "precious" module is in use (ie the "-precious" switch
somehow frees it up for upgrade) ?

Cheers,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top