[30401] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1644 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 16 03:09:47 2008

Date: Mon, 16 Jun 2008 00:09:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 16 Jun 2008     Volume: 11 Number: 1644

Today's topics:
    Re: calling external program tiff2pdf <szrRE@szromanMO.comVE>
    Re: calling external program tiff2pdf <szrRE@szromanMO.comVE>
    Re: Checking if an object inherits from class T <brian.d.foy@gmail.com>
    Re: Checking if an object inherits from class T <koszalekopalek@interia.pl>
    Re: How Does One Implement a Timer in Perl? <brian.d.foy@gmail.com>
    Re: How Does One Implement a Timer in Perl? <hjp-usenet2@hjp.at>
    Re: Learning Perl <gord.c.e@gmail.com>
    Re: LWP::Simple getstore with absolute path not working <szrRE@szromanMO.comVE>
    Re: LWP::Simple getstore with absolute path not working <dksleung@hotmail.com>
    Re: LWP::Simple getstore with absolute path not working <dksleung@hotmail.com>
        new CPAN modules on Mon Jun 16 2008 (Randal Schwartz)
        Offsetting dates from the past in Date::Manip <pwaring@gmail.com>
    Re: perl 5.10 <brian.d.foy@gmail.com>
    Re: perl 5.10 <greymausg@mail.com>
        Printing on OSX <Philip@kime.org.uk>
    Re: Printing on OSX <ben@morrow.me.uk>
    Re: Printing on OSX <Philip@kime.org.uk>
    Re: rt.cpan.org works ok (was: Re: rt.cpan.org, search. <brian.d.foy@gmail.com>
    Re: rt.cpan.org works ok (was: Re: rt.cpan.org, search. <brian.d.foy@gmail.com>
    Re: rt.cpan.org works ok <rvtol+news@isolution.nl>
    Re: rt.cpan.org, search.cpan.org: why so unuseable? <brian.d.foy@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 15 Jun 2008 15:14:13 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: calling external program tiff2pdf
Message-Id: <g3447m01dsg@news4.newsguy.com>

John wrote:
> "Jens Thoms Toerring" <jt@toerring.de> wrote in message
> news:6bf1i4F3arn58U1@mid.uni-berlin.de...
>> John <john1949@yahoo.com> wrote:
>>> Part of program
>>
>>> my $filename="fred.tiff";
>>> my $newfile="john.pdf";
>>> system ("tiff2pdf -o $newfile $filename");
>>
>>> There is no conversion.
>>
>> I guess you shouldn't have a space between the '-o' and the
>> '$newfile'.
>>                      Regards, Jens
>> --
>>  \   Jens Thoms Toerring  ___      jt@toerring.de
>>   \__________________________      http://toerring.de
>
> Hi
>
> Tried that but it didn't work.
> It is strange since it works on the linux command line when I key in
> tiff2pdf -o john.pdf fred.tiff
> Odd.

Then it might be a permissions problem then. Make sure the script has rw 
access to the dir the pdf will be written in.

-- 
szr 




------------------------------

Date: Sun, 15 Jun 2008 15:17:15 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: calling external program tiff2pdf
Message-Id: <g344dc01dv8@news4.newsguy.com>

A. Sinan Unur wrote:
> "John" <john1949@yahoo.com> wrote in
> news:g2tvd1$epa$1@news.albasani.net:
>
>> Manage to crack it.  You need to place all parameters in quotes
>> including the -o.
>>
>> system ("tiff2pdf","-o","$newfile","$filename")
>
> Nope, you misunderstand what you did here. The quotation marks above
> are not important. What is important is the fact that you passed
> system a LIST rather than a single string which by-passed the shell.
> I am assuming the actual $newfile and $filename contained some
> characters that were problematic for the shell.

Also, $newfile and $filename don't need double quotes around them. Just 
pass them straight:

   system ('tiff2pdf', '-o', $newfile, $filename);


> perldoc -f system

-- 
szr 




------------------------------

Date: Sun, 15 Jun 2008 09:29:09 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: Checking if an object inherits from class T
Message-Id: <150620080929090368%brian.d.foy@gmail.com>

In article <4853c7d5$0$6554$9b4e6d93@newsspool3.arcor-online.net>,
Christian Winter <thepoet_nospam@arcor.de> wrote:

> Koszalek Opalek wrote:
> > I am using objects of class T and objects of
> > other classes that inherit from T. Somewhere
> > in my code I need to check if an object is of
> > class T or of any other class that inherits
> > from T.
> 
> You can use Class->isa() (see "perldoc UNIVERSAL"):
> 
> if( ref($obj)->isa('T') )
> {
>    # class is T or inherits from it
> }

actaully, you want to do

   if( eval { $obj->isa("T") } )

Call isa() directly on the object, and don't care too much about what
is actaully in $obj. If it's not an object, you just get back false,
which is still the right nswer to the question. :)


------------------------------

Date: Sun, 15 Jun 2008 22:51:50 -0700 (PDT)
From: Koszalek Opalek <koszalekopalek@interia.pl>
Subject: Re: Checking if an object inherits from class T
Message-Id: <1fd3f422-2a16-4d34-94e6-7325d66cc6e2@d45g2000hsc.googlegroups.com>

On Jun 15, 4:29=A0pm, brian d  foy <brian.d....@gmail.com> wrote:
> In article <4853c7d5$0$6554$9b4e6...@newsspool3.arcor-online.net>,

> actaully, you want to do
>
> =A0 =A0if( eval { $obj->isa("T") } )
>
> Call isa() directly on the object, and don't care too much about what
> is actaully in $obj. If it's not an object, you just get back false,
> which is still the right nswer to the question. :)

I fixed my code and then bumped in this very problem
(i.e. Can't call method "isa" without a package or object
reference). I come to perl.misc and there is an answer
before I even asked the question :D.

K.


------------------------------

Date: Sun, 15 Jun 2008 09:49:49 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: How Does One Implement a Timer in Perl?
Message-Id: <150620080949494774%brian.d.foy@gmail.com>

In article <7lr754d2f3hs5cqop91e45c3paf03gop4r@4ax.com>, Jürgen Exner
<jurgenex@hotmail.com> wrote:

> Ben Morrow <ben@morrow.me.uk> wrote:

> >select(undef, undef, undef, $timeout) is a standard way of doing
> >sub-second sleeps.


> Maybe it's worth adding this tidbit to the FAQ entry for timeout?

Are you talking about "How do I timeout a slow event?" in perlfaq8?

How would select() work like that? You can pause, but I don't see how
you could let something else execute while you are doing it. What am I
missing? :)


------------------------------

Date: Sun, 15 Jun 2008 19:50:33 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: How Does One Implement a Timer in Perl?
Message-Id: <slrng5alj9.7r3.hjp-usenet2@hrunkner.hjp.at>

On 2008-06-15 14:49, brian d foy <brian.d.foy@gmail.com> wrote:
> In article <7lr754d2f3hs5cqop91e45c3paf03gop4r@4ax.com>, Jürgen Exner
><jurgenex@hotmail.com> wrote:
>
>> Ben Morrow <ben@morrow.me.uk> wrote:
>
>> >select(undef, undef, undef, $timeout) is a standard way of doing
>> >sub-second sleeps.
>
>
>> Maybe it's worth adding this tidbit to the FAQ entry for timeout?
>
> Are you talking about "How do I timeout a slow event?" in perlfaq8?
>
> How would select() work like that? You can pause, but I don't see how
> you could let something else execute while you are doing it. What am I
> missing? :)

Quite often you don't have something else to execute while waiting for
I/O. In this case using select saves the hassles associated with signals
(but you get the hassles assoiciated with unbuffered (and possibly
non-blocking) I/O instead).

	hp



------------------------------

Date: Sun, 15 Jun 2008 23:58:42 -0700
From: "Gordon Corbin Etly" <gord.c.e@gmail.com>
Subject: Re: Learning Perl
Message-Id: <6bmh95F3c5ntcU1@mid.individual.net>

Ben Bullock wrote:
> On Thu, 12 Jun 2008 19:04:46 +0000, Uri Guttman wrote:

> > the problem is that most learning users of perl don't know enough
> > perl or how to teach to explain things correctly and with enough
> > depth and coverage.

> The other problem is that the people who do know enough Perl seem to
> prefer writing incomprehensible gibberish ("Camel Books", "perldoc
> perlre", etc.) to writing something that normal people can understand.

Exactly, this is the general disconnect in this group between the 
'experts' and the 'beginners' and thus you've stumbled upon where the 
lack of necessary communication lies. It's not unlike a generational 
gap.


> > What is the syntax for a list literal
> > ( value1, value2, ....)
> >
> > huh? that is a list. literals are possible values in the list.

Actually, you could say a list is a literal representation of an array, 
just as 123 or "abc" are literal representations of primitive scalars 
(they are constants and cannot be modified; you put them into the 
appropriate variable so that you can modify it as needed.)


> > What is the effect of using negative number for an array index
> > it starts counting from the end of the array backwards
> >
> > that is from the department of redundant answers department.

> Sorry, but I don't see why it is redundant. That seems like a useful
> piece of knowledge to me. C programmers who used a negative number in
> an array index would expect to get a crash and a "segmentation fault"
> error, so why is it redundant to point out that Perl is different
> from C here?

Exactly, this is one of those things that needs to be emphasized more.


> > How do you access an element in an array
> > use [ ]
> > x[3];
> >
> > i see a syntax bug there!

> Agreed, this is an error. If Larry Wall forgot a dollar we'd call it a
> "typo" though. So we've established that there are a few typos in the
> test.

And you've stumbled upon another of the general problems in these neck 
of the woods; some people refuse to give the benefit of the doubt and 
just assume the worst.


> > What value do variables hold until defined
> > undef
> >
> > hmm. do arrays and hashes hold undef? that should be scalar
> > variables.

Actaully, yes they do:

 # perl -e 'my @arr; print int(@arr == undef), "\n"'
 1
 # perl -e 'my %hash; print int(%hash == undef), "\n"'
 1

If you assign actual values before hand then it prints "0\n"


> > How are all numbers stored interally by Perl
> > double-precision floating-point values
> >
> > hmm, i wonder what IV's have to say about that?

> The question is a bit weird, I don't know how numbers are stored
> internally by Perl.

Easy: in RAM ;P


> > How can you run Perl with warnings enabled
> > -e
> > perl -e program_name
> >
> > whoops!! that flash card should be flashing red!
> >
> > so as you can see, this site needs plenty of fixes and editing and 
> > it
> > doesn't seem to be too helpful.

> It needs a few fixes. Trying too hard to find fault with it by
> harshly criticising stuff which isn't really broken is
> counterproductive though.

True. While some [better] proof reading would have definitely helped 
here, being over critical more often than not will not make one want to 
be very receptive of the critisim.


> > simple questions like these is not the
> > way to learn programming in any language.

It certainly isn't useful when people make blanket statements like this, 
as you cannot speak for everyone, and that is yet another problem people 
like your self have; attempting to portray your point of view as the 
dominant one, and that completely ignored all the readers out there who 
might see things differently.


> Hmm, I have no idea, but since there are millions of people out there,
> who knows, perhaps it is useful for someone. I don't think it's
> harmful.

As Perl shows us, there are often more than one way to do or see things.


-- 
G. C. Etly 




------------------------------

Date: Sun, 15 Jun 2008 14:55:45 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: LWP::Simple getstore with absolute path not working
Message-Id: <g3435201d88@news4.newsguy.com>

Ben Morrow wrote:
> Quoth emrefan <dksleung@hotmail.com>:
>> I am using the following line of sort in a batch file to fetch things
>> off the network quickly and mostly I have success but if I need to
>> indicate an absolute path in the URL, I always get a "not found"
>> error.  I have perl 5.8.x, URI.pm 1.36 and URI::URL.pm 5.03 on the XP
>> system
>> where did the test. Help!
>>
>>                     perl -MLWP::Simple -e "getstore( '%1', '%2' );"
>>
>> Oh, the exact URL that I tested it was something like this:
>>
>> ftp://user:password@some.computer.some.where//dir-under-the-root/some-dir/some-file
>>
>> I thought the "//" before "dir-under-the-root" should have it working
>> for me, but no.
>
> FTP urls don't work like that. The standard hack is

Actually the url he gave is mostly correct (should be just one "/" after 
the host par:

ftp://user:password@some.computer.some.where/dir-under-the-root/some-dir/some-file

This should work just fine.

You may want to test it in a browser and then in your script add checks 
to catch cases where  adir or file doesn't exist.

>    ftp://host/%2fdir-under-the-root/some-dir/some-file
>
> where %2f is a url-encoded '/'; but strictly speaking this requires
> your FTP server to support a chdir to '/dir-under-the-root' in one
> go, which is not required. Most do, however.


Why would it need to do that? Give that url, it should be going to 
"/fdir-under-the-root/some-dir/some-file" in one go.

-- 
szr 




------------------------------

Date: Sun, 15 Jun 2008 23:34:25 -0700 (PDT)
From: emrefan <dksleung@hotmail.com>
Subject: Re: LWP::Simple getstore with absolute path not working
Message-Id: <faf1d601-c025-4277-a328-1f852a09dc28@z16g2000prn.googlegroups.com>

On Jun 16, 5:55=A0am, "szr" <sz...@szromanMO.comVE> wrote:
> Ben Morrow wrote:
> > Quoth emrefan <dksle...@hotmail.com>:
> >> I am using the following line of sort in a batch file to fetch things
> >> off the network quickly and mostly I have success but if I need to
> >> indicate an absolute path in the URL, I always get a "not found"
> >> error. =A0I have perl 5.8.x, URI.pm 1.36 and URI::URL.pm 5.03 on the XP=

> >> system
> >> where did the test. Help!
>
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 perl -MLWP::Simple -e "getstore=
( '%1', '%2' );"
>
> >> Oh, the exact URL that I tested it was something like this:
>
> >> ftp://user:passw...@some.computer.some.where//dir-under-the-root/some-d=
ir/some-file
>
> >> I thought the "//" before "dir-under-the-root" should have it working
> >> for me, but no.
>
> > FTP urls don't work like that. The standard hack is
>
> Actually the url he gave is mostly correct (should be just one "/" after
> the host par:
>
> ftp://user:passw...@some.computer.some.where/dir-under-the-root/some-dir/s=
ome-file
>
> This should work just fine.
>
> You may want to test it in a browser and then in your script add checks
> to catch cases where =A0adir or file doesn't exist.
>
> > =A0 =A0ftp://host/%2fdir-under-the-root/some-dir/some-file
>
> > where %2f is a url-encoded '/'; but strictly speaking this requires
> > your FTP server to support a chdir to '/dir-under-the-root' in one
> > go, which is not required. Most do, however.
>
> Why would it need to do that? Give that url, it should be going to
> "/fdir-under-the-root/some-dir/some-file" in one go.

When a user logs in via ftp (including when the user is "anonymous"),
he is placed in wherever is considered his home directory and if this
home directory does not happen to be "/", then the URL with just a
slash after the hostname is not going to work as intended.  I tested
that, had problems and so queried.  With an "%2f" after the hostname,
it worked. I reckond I'd call that a bug in URI.pm & co. but at least
I now have a workaround.


------------------------------

Date: Sun, 15 Jun 2008 23:36:52 -0700 (PDT)
From: emrefan <dksleung@hotmail.com>
Subject: Re: LWP::Simple getstore with absolute path not working
Message-Id: <4034385f-d33e-40fe-8900-87876f585bc1@z16g2000prn.googlegroups.com>

On Jun 14, 11:53=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth emrefan <dksle...@hotmail.com>:
>
> > I am using the following line of sort in a batch file to fetch things
> > off the network quickly and mostly I have success but if I need to
> > indicate an absolute path in the URL, I always get a "not found"
> > error. =A0I have perl 5.8.x, URI.pm 1.36 and URI::URL.pm 5.03 on the XP
> > system
> > where did the test. Help!
>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 perl -MLWP::Simple -e "getstore(=
 '%1', '%2' );"
>
> > Oh, the exact URL that I tested it was something like this:
>
> > ftp://user:passw...@some.computer.some.where//dir-under-the-root/some-di=
r/some-file
>
> > I thought the "//" before "dir-under-the-root" should have it working
> > for me, but no.
>
> FTP urls don't work like that. The standard hack is
>
> =A0 =A0ftp://host/%2fdir-under-the-root/some-dir/some-file
>
> where %2f is a url-encoded '/'; but strictly speaking this requires your
> FTP server to support a chdir to '/dir-under-the-root' in one go, which
> is not required. Most do, however.

Thanks! It worked. I think I bumped into a bug in URI.pm & co, but at
least I now have a workaround. :)


------------------------------

Date: Mon, 16 Jun 2008 04:42:19 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Jun 16 2008
Message-Id: <K2JH2J.H39@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

API-Plesk-1.05
http://search.cpan.org/~nrg/API-Plesk-1.05/
OOP interface to the Plesk XML API (http://www.parallels.com/en/products/plesk/). 
----
B-Debug-1.06
http://search.cpan.org/~rurban/B-Debug-1.06/
Walk Perl syntax tree, printing debug info about ops 
----
CPAN-Testers-ParseReport-0.0.2
http://search.cpan.org/~andk/CPAN-Testers-ParseReport-0.0.2/
parse reports to cpantesters.perl.org from various sources 
----
Catalyst-Plugin-Config-YAML-XS-0.01
http://search.cpan.org/~fayland/Catalyst-Plugin-Config-YAML-XS-0.01/
Configure your Catalyst application via an external YAML file 
----
Class-DBI-Plugin-DistinctValues-0.03
http://search.cpan.org/~tokuhirom/Class-DBI-Plugin-DistinctValues-0.03/
You can get unique values of a column 
----
Coro-4.743
http://search.cpan.org/~mlehmann/Coro-4.743/
coroutine process abstraction 
----
Data-SimplePassword-0.04
http://search.cpan.org/~ryochin/Data-SimplePassword-0.04/
Simple random password generator 
----
Foorum-0.1.5
http://search.cpan.org/~fayland/Foorum-0.1.5/
Foorum is a forum script built in Catalyst. 
----
Foorum-0.1.6
http://search.cpan.org/~fayland/Foorum-0.1.6/
Foorum is a forum script built in Catalyst. 
----
Goto-Cached-0.08
http://search.cpan.org/~chocolate/Goto-Cached-0.08/
a fast drop-in replacement for Perl's O(n) goto 
----
HTML-MobileJp-0.05
http://search.cpan.org/~tokuhirom/HTML-MobileJp-0.05/
generate mobile-jp html tags 
----
HTML-WebDAO-0.89
http://search.cpan.org/~zag/HTML-WebDAO-0.89/
Perl extension for create complex web application 
----
HTML-WikiConverter-DokuWikiFCK-0.23
http://search.cpan.org/~turnermm/HTML-WikiConverter-DokuWikiFCK-0.23/
A WikiConverter Dialect supporting the FCKeditor in DokuWiki 
----
Module-Used-v1.0.0
http://search.cpan.org/~elliotjs/Module-Used-v1.0.0/
Find modules loaded by Perl code without running it. 
----
Music-Audioscrobbler-MPD-0.11
http://search.cpan.org/~ealleniii/Music-Audioscrobbler-MPD-0.11/
Module providing routines to submit songs to last.fm from MPD. 
----
Music-Audioscrobbler-Submit-0.03
http://search.cpan.org/~ealleniii/Music-Audioscrobbler-Submit-0.03/
Module providing routines to submit songs to last.fm using 1.2 protocol. 
----
Net-Abuse-Utils-0.09
http://search.cpan.org/~mikegrb/Net-Abuse-Utils-0.09/
Routines useful for processing network abuse 
----
OpenOffice-OODoc-2.103
http://search.cpan.org/~jmgdoc/OpenOffice-OODoc-2.103/
The Perl Open OpenDocument Connector 
----
RDF-Trine-0.108_01
http://search.cpan.org/~gwilliams/RDF-Trine-0.108_01/
An RDF Framework for Perl. 
----
Sledge-Plugin-Captcha-0.03
http://search.cpan.org/~tokuhirom/Sledge-Plugin-Captcha-0.03/
create and validate Captcha for Sledge. 
----
Sledge-Plugin-Inflate-0.04
http://search.cpan.org/~tokuhirom/Sledge-Plugin-Inflate-0.04/
inflate object from request or session. 
----
Sledge-Plugin-Pager-0.02
http://search.cpan.org/~tokuhirom/Sledge-Plugin-Pager-0.02/
----
Sledge-Plugin-PictogramEntities-0.03
http://search.cpan.org/~tokuhirom/Sledge-Plugin-PictogramEntities-0.03/
Pictogram entities filter 
----
Sys-Info-Driver-Windows-XS-0.20
http://search.cpan.org/~burak/Sys-Info-Driver-Windows-XS-0.20/
XS Wrappers for Sys::Info Windows driver 
----
Sys-Syslog-0.26
http://search.cpan.org/~saper/Sys-Syslog-0.26/
Perl interface to the UNIX syslog(3) calls 
----
SystemTray-Applet-0.02
http://search.cpan.org/~psinnott/SystemTray-Applet-0.02/
OS agnostic system tray applets 
----
SystemTray-Applet-Win32-0.01
http://search.cpan.org/~psinnott/SystemTray-Applet-Win32-0.01/
Windows support for SystemTray::Applet 
----
Test-Snippet-0.02
http://search.cpan.org/~tokuhirom/Test-Snippet-0.02/
doctest for perl 
----
WWW-Plurk-0.01
http://search.cpan.org/~andya/WWW-Plurk-0.01/
Unoffical plurk.com API 
----
XML-API-0.23
http://search.cpan.org/~mlawren/XML-API-0.23/
Perl extension for writing XML 
----
autodie-1.10_05
http://search.cpan.org/~pjf/autodie-1.10_05/
Replace functions with ones that succeed or die with lexical scope 
----
mobirc-1.01
http://search.cpan.org/~tokuhirom/mobirc-1.01/
modern IRC to HTTP gateway 
----
stockmonkey-2.3
http://search.cpan.org/~jettero/stockmonkey-2.3/


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Date: Sun, 15 Jun 2008 12:00:54 -0700 (PDT)
From: "pwaring@gmail.com" <pwaring@gmail.com>
Subject: Offsetting dates from the past in Date::Manip
Message-Id: <877463ad-769b-4ad0-9a18-9115b91726e7@p25g2000hsf.googlegroups.com>

I'm trying to use Date::Manip to resolve strings which represent dates
according to a known reference point - e.g. given a known date, what
does "Friday" represent?. If I do something like this:

my $date = ParseDate("Friday");
print $date;

I get the result I expect, i.e. 13/06/08 (assuming I changed the
format to DD/MM/YY). However, the date used for as the reference point
is always the current date, and I want to be able to put in an
arbitrary date and have the reference resolved from there. For
example, if I use this time last year, "Friday" should be resolved to
a different date - 15/06/07. Does anyone know if it is possible to do
this within Date::Manip? I've tried using DateCalc, but this gives me
an offset from the current date, which isn't really what I want.

Thanks in advance,

Paul

P.S. I'm only dealing with recent dates (1990-present), so there
shouldn't be any problems with pre-1900 dates etc.


------------------------------

Date: Sun, 15 Jun 2008 09:27:05 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: perl 5.10
Message-Id: <150620080927052908%brian.d.foy@gmail.com>

In article <slrng59ppv.66e.greymausg@maus.org>, greymaus
<greymausg@mail.com> wrote:

> I have perl 5.8.8, instaled 5.10, had some small problems with it, so I
> wemt back to 5.8.8 (ln /usr/bin/perl5.8.8 /usr/bin/perl). Now, I want to
> do some work with 5.10. How do I get the system to have one user have
> perl->perl5.10.0 and the rest have perl->perl5.8.8.?
> Something in his/her .profile ?

That was an article I wrote for the Spring 2008 issue of The Perl
Review :)

Configure and install 5.10 in it's own space. Mostly you have to watch
out for the library directories and not overwriting /usr/bin/perl.

After you have 5.10 installed in it's own directory, you can move,
copy, or link the binary whereever you like.

Good luck :)


------------------------------

Date: 15 Jun 2008 19:37:46 GMT
From: greymaus <greymausg@mail.com>
Subject: Re: perl 5.10
Message-Id: <slrng5ap0o.6jh.greymausg@maus.org>

On 2008-06-15, Ben Morrow <ben@morrow.me.uk> wrote:
>
> Quoth Owen <xemoth@gmail.com>:
>> On Jun 15, 6:37 pm, greymaus <greyma...@mail.com> wrote:
>> > I have perl 5.8.8, instaled 5.10, had some small problems with it, so I
>> > wemt back to 5.8.8 (ln /usr/bin/perl5.8.8 /usr/bin/perl). Now, I want to
>> > do some work with 5.10. How do I get the system to have one user have
>> > perl->perl5.10.0 and the rest have perl->perl5.8.8.?
>> > Something in his/her .profile ?
>> 
>> try something like this in the .bashrc or .profile files
>> 
>> export PERL5LIB="/usr/bin/perl5.10.0"
>
> Err... no. Not even close.
>
> The simplest answer is to install 5.10 without the /usr/bin/perl alias
> (pass -Dversiononly -Uusrbinperl to Configure) and then set up a shell
> alias perl => perl5.10.0 for that user. The alternative would be to
> install 5.10 somewhere else entirely (like /usr/local, or /opt/perl5.10)
> and put that location first in that user's path.
>
> Both of these require that you install perl yourself from source. If
> you're installing it from a package system you will need to see if that
> package system supports this sort of thing.
>
> Ben
>
Following all your suggestions, I installed perl10.0 in /home/thisuser/bin
ln'd /home/thisuser/bin/perl to it, and just ran a test
#!/home/thisuser/bin/perl
print "Hi\n"; (works)
(next is to see if it can find the modules, as I have done PERL5LIB in
 .profile.

anyway, thanks all!


-- 
Greymaus
 .
  .
 ...  
Time for thought. 


------------------------------

Date: Sun, 15 Jun 2008 13:21:35 -0700 (PDT)
From: philkime <Philip@kime.org.uk>
Subject: Printing on OSX
Message-Id: <8315aaff-223a-4e4d-9222-5ec6e934518f@p25g2000pri.googlegroups.com>

I'm looking for a Win32::Printer equivalent for OSX - any ideas? Needs
to be a fairly primitive printing API so I can draw on the page etc.,
like the Win32::Printer module. Any ideas?


------------------------------

Date: Mon, 16 Jun 2008 00:20:51 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Printing on OSX
Message-Id: <jnkgi5-4dr.ln1@osiris.mauzo.dyndns.org>


Quoth philkime <Philip@kime.org.uk>:
> I'm looking for a Win32::Printer equivalent for OSX - any ideas? Needs
> to be a fairly primitive printing API so I can draw on the page etc.,
> like the Win32::Printer module. Any ideas?

Since OS X uses PDF as its native graphics format, can you not use one
of the PDF-creating modules (there are several) and then send that to
the printer?

Ben

-- 
I've seen things you people wouldn't believe: attack ships on fire off
the shoulder of Orion; I watched C-beams glitter in the dark near the
Tannhauser Gate. All these moments will be lost, in time, like tears in rain.
Time to die.                                                   ben@morrow.me.uk


------------------------------

Date: Sun, 15 Jun 2008 18:22:37 -0700 (PDT)
From: philkime <Philip@kime.org.uk>
Subject: Re: Printing on OSX
Message-Id: <fd3e8996-af7b-4fdc-a9d1-c9dd67bb46eb@w8g2000prd.googlegroups.com>

On Jun 15, 4:20 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth philkime <Phi...@kime.org.uk>:
>
> > I'm looking for a Win32::Printer equivalent for OSX - any ideas? Needs
> > to be a fairly primitive printing API so I can draw on the page etc.,
> > like the Win32::Printer module. Any ideas?
>
> Since OS X uses PDF as its native graphics format, can you not use one
> of the PDF-creating modules (there are several) and then send that to
> the printer?

I could but I was hoping for something a little more primitive. Nice
thing about the Win32::Printer was that it used the OS native print
dialog.


------------------------------

Date: Sun, 15 Jun 2008 09:32:05 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: rt.cpan.org works ok (was: Re: rt.cpan.org, search.cpan.org: why so unuseable?)
Message-Id: <150620080932050914%brian.d.foy@gmail.com>

In article <g32vih.168.1@news.isolution.nl>, Dr.Ruud
<rvtol+news@isolution.nl> wrote:

> Ben Bullock schreef:
> 
> > Whenever I try to submit a bug via rt.cpan.org, I have to go through
> > about five screens in order to log in.
> 
> I go to https://rt.cpan.org and am automatically loggged in, without any
> hassle at all.

How do you get automatically logged in? I've never been able to figure
out that part.


------------------------------

Date: Sun, 15 Jun 2008 09:45:54 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: rt.cpan.org works ok (was: Re: rt.cpan.org, search.cpan.org: why so unuseable?)
Message-Id: <150620080945540686%brian.d.foy@gmail.com>

In article <g32vih.168.1@news.isolution.nl>, Dr.Ruud
<rvtol+news@isolution.nl> wrote:

> Ben Bullock schreef:

> > what's wrong with search.cpan.org? I
> > have no idea what software is behind the search engine, but sometimes
> > the search pages come up totally blank or they miss things which I
> > know are there.
> 
> I use it every day and have never had that experience, so the problem
> must be at your end.

A lot of people (including me), have the same complaints: Don't
discount what Ben said just because you don't have a problem.

http://brad.livejournal.com/2342234.html

http://use.perl.org/~Alias/journal/34801

https://twitter.com/gisle/statuses/782101160


------------------------------

Date: Mon, 16 Jun 2008 01:40:40 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: rt.cpan.org works ok
Message-Id: <g34gbm.1do.1@news.isolution.nl>

brian d foy schreef:
> Dr.Ruud:
>> Ben Bullock:

>>> Whenever I try to submit a bug via rt.cpan.org, I have to go through
>>> about five screens in order to log in.
>>
>> I go to https://rt.cpan.org and am automatically loggged in, without
>> any hassle at all.
>
> How do you get automatically logged in? I've never been able to figure
> out that part.

When I am logged in at bitcard, I only need to click the Login button
(the one with thee double lines border).

Logging in at bitcard is facilitated by the default password vault of
Firefox.

-- 
Affijn, Ruud

"Gewoon is een tijger."



------------------------------

Date: Sun, 15 Jun 2008 09:44:28 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: rt.cpan.org, search.cpan.org: why so unuseable?
Message-Id: <150620080944285523%brian.d.foy@gmail.com>

In article <g31o2s$i67$1@ml.accsnet.ne.jp>, Ben Bullock
<benkasminbullock@gmail.com> wrote:

> Whenever I try to submit a bug via rt.cpan.org, I have to go through 
> about five screens in order to log in. 

Yeah, that's a pain in the ass.

> Perl should be able to 
> do much better. CPAN should tell the people behind rt.cpan.org to make it 
> useable, or ditch the whole RT system in favour of something which 
> actually works, 

Well, it has been brought up several times before. "CPAN" isn't really
anything. There isn't a person who can "tell" anyone to fix RT, or
anything else, and there is no one who can tell any particular module
author that they have to use RT. Authors are free to use any system
they like. They might use Sourceforge, or Google Code, or their own
thing. 

RT is there because Best Practical set it up and automatically creates
user accounts for all module authors. It's only official in the sense
that most people use it, not because it was selected or any other
service was not selected.

> it would be better if the Perl foundation spent its money employing a 
> full-time administrator of CPAN to sort out these bugs.

RT is a product of Best Practical, which doesn't need any money to fix
the problems. Their's is a problem of priority and motivation.

Money is almost never the problem in things like this. You need to find
someone who cares to fix it.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 1644
***************************************


home help back first fref pref prev next nref lref last post