Pollution and Inheritance
I'm writing a module, Some::Module::Extended, which is a sub-class of Some::Module. There are two or three methods that I want Some::Module::Extended to override - I want them to do some munging of their arguments before sending them on to the parent method. So, for example: # Some::Module::Extended isa Some::Module sub new { my $proto = shift; my $class = ref($proto) || $proto; my $data = shift; $data =~ s/foo/bar/g; my $self = $class->SUPER::new( $data ); bless ($self, $class); return $self; } However, I'm also a big user of Some::DifferentModule, that, incidentally, uses Some::Module, and returns Some::Module objects. Some::DifferentModule is on the CPAN, and I don't want to subclass it or change it. What I would like to do, is to be able to say something like: use Some::Module::Extended qw( pollute ); And have Some::Module::Extended pretend to be Some::Module as far as any other calls in the application (like those from Some::DifferentModule) are concerned. Thoughts? +Pete -- B: Are you thinking what I'm thinking, Pinky? P: Uh... yeah, Brain, but where are we going to find rubber pants our size? -- Pinky and Brain
Re: Oops - I meant OT Virtual Reality?
James Campbell said: > Humble appologies it was my understanding that this list reserved the marker [OT] for perl-related content. i'd be all about a VR experiment, but i'm not near. -- muppet
Re: [OT] submitting a perl bug without ``perlbug''?
Belden Lyman wrote: > A few months back I encountered a switch ordering bug with > Perl 5.6.1 and 5.8 on Solaris. (-w -T on #! line doesn't work; > -T -w does work, as do -wT and -Tw.) > > I wasn't able to 'perlbug' it at the time, and am still unable > to do so. On occassion, I remember the bug and wish there were > some way for me to submit it... what's the accepted way to do > so in this case? Send an email to perlbug at prel punkt org. Don't forget perl -V, esp. because I can't reproduce your bug (if I understood correctly :) $ cat foo.pl #!/opt/perl580/bin/perl -w -T print "${^TAINT} $^W\n"; $ ./foo.pl 1 1
Re: Meetings
* Mark Fowler ([EMAIL PROTECTED]) wrote: > On Mon, 4 Aug 2003, Nigel Rantor wrote: > > > would be interested in any signs that you lot think are indicative. > > As Dave said, we'll be in the cellar bar so it shouldn't be too hard to > find us. I'm bringing party hats. And to help people find me, I'll be > wearing (for one night only) one of the many totally unique tie-dyed > Learning Perl t-shirts that Dan made. > will other people be wearing clothes they won at the auction - leon? G. -- Greg McCarroll http://www.mccarroll.org.uk/~gem/ jabber://[EMAIL PROTECTED] msn://[EMAIL PROTECTED]
Re: interrupt only working once
That works a treat - thanks Andy On Tue, 2003-08-05 at 14:58, Luis Campos de Carvalho wrote: > Andy Ford wrote: > > I am testing out signal (I nearly wrote single - and I'm married) > > trapping so I can use it in a number of scrits all ready in service. > > > >Beware with the anger wife reading emails... =-] > > > The basic concept seems relatively straight forward, however my SIGHUP > > only seems to work once... > > > > $SIG{'HUP'} = \&catch_signal; # best strategy > > > > sub catch_signal > > { > > etc > > etc > > } > > > > This should be a simple one > >I vaguely remember of reading something about signal processing in > the Camel Book, saying that you should try > >$SIG{HUP} = \&process_sighup; > >sub process_sighup { > # signal processing here... > # ... > $SIG{HUP} = \&process_sighup; >} > >But I can be wrong, of course. >Regards.
Re: interrupt only working once
On 05 Aug 2003 16:40:23 +0100, Andy Ford <[EMAIL PROTECTED]> wrote: > d_sigaction='define'; Ok, in that case, I can only conclude that I have no idea why that's going on. Sorry! -Dom -- | Semantico: creators of major online resources | | URL: http://www.semantico.com/ | | Tel: +44 (1273) 72 | | Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |
Re: interrupt only working once
On 05 Aug 2003 16:21:42 +0100, Andy Ford <[EMAIL PROTECTED]> wrote: > Solaris 2.8 How odd - that definitely supports sigaction. Maybe perl's configure hasn't picked it up? What does "perl -V:d_sigaction" say? -Dom -- | Semantico: creators of major online resources | | URL: http://www.semantico.com/ | | Tel: +44 (1273) 72 | | Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |
Re: Meetings
Greg McCarroll [EMAIL PROTECTED] quoth: *> *>will other people be wearing clothes they won at the auction - leon? He needs to send me his postal address first :) e.
Re: text'd or texted
On 5 Aug 2003 at 10:55, Rafael Garcia-Suarez wrote: > "hlör u fang axaxaxas mlö". I see. Googled for it, and after reading up at a couple of sites, it reminded me of http://www.zompist.com/kitgram.html#partspeech , specifically of the bit about "It stones whileunder it grows greeningly" (and that URL mentions Borges, too). I also like Zompist's comment about "whether we weren't just fooling ourselves". Another thing that came to my mind was Lojban and its _brivla_, which are predicates and could be noun-ish, verb-ish, or adjective-ish in translation depending on the context. So you could claim it's a language without nouns and adjectives and that it uses verbs for those functions; {lo gerku cu bunre} could then be translated as something like "that-which-dogs, browns" rather than "The dog is brown", which is how I'd probably translate the sentence. Cheers, Philip -- Philip Newton <[EMAIL PROTECTED]>
Re: text'd or texted
Philip Newton wrote: > On 5 Aug 2003 at 9:41, Andy Ford wrote: > > > Another word to confuse the non English speaking community -the verb to > > text!! > > Any noun can be verbed (though verbing weirds language). "hlör u fang axaxaxas mlö". I let you "google" for it.
Re: text'd or texted
On Tue, 5 Aug 2003 04:02:23 -0500, Elaine -HFB- Ashton <[EMAIL PROTECTED]> wrote: > Welcome to English where any noun can be verbed :) Also popular is 'to > SMS' or 'to be SMS-ed'. Surely that's just a smidgeon to close to S&M'd? -Dom -- | Semantico: creators of major online resources | | URL: http://www.semantico.com/ | | Tel: +44 (1273) 72 | | Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |
Re: Meetings
On Mon, 4 Aug 2003, Nigel Rantor wrote: > would be interested in any signs that you lot think are indicative. As Dave said, we'll be in the cellar bar so it shouldn't be too hard to find us. I'm bringing party hats. And to help people find me, I'll be wearing (for one night only) one of the many totally unique tie-dyed Learning Perl t-shirts that Dan made. Mark. -- #!/usr/bin/perl -T use strict; use warnings; print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};
[ANNOUNCE] 5th Birthday Competition
We're five! We're five! What could be better? How about to celebrate we get our good friends at O'Reilly to give a way a free subscription to Safari (their online subscription service) for first prize in a fifth birthday competition, with prizes for second place and spot prizes for other entities? Well, it's a good job O'Reilly are jolly nice people, as that's exactly what we're doing. What do you have to do to win this you ask? Well, you have to complete the following sentence: "It's amazing that in five years London Perl Mongers ..." Since I hate long drawn out competitions, you have a little over 48 hours to submit your entries; The closing time is 5.30pm UK time on Thursday 7th August 2003. How to Submit - Send your answers to [EMAIL PROTECTED] The mail must contain only your entry and a optionally properly delimited signature. One entry per mail (but you may send multiple mails.) You *must* *not* include your name in the body of this email. This is because I'll be using a simple perl script to extract out all the entries (and just the entries) so I don't know who wrote them and can't be accused of favouritism. Rules - This competition will be judged by Mark Fowler. The judge's decision in all matters to be considered final. Entries not in the correct format will be disqualified. Multiple entries are fine, but the judge may arbitrarily disqualify anyone he suspects of brute force submission. No cash alternatives. Winners will be announced at the London.pm 5th Birthday Social meeting on the 7th August, and later posted to the London.pm list. Friends and/or relatives of Mark Fowler may enter, but he can't. Sucks to be him. Emails must comply to RFC822. For the purpose of this competition a properly delimited signature is defined as a signature delimited by a line containing only '-- ' followed by a newline. Though you retain copyright on your entries, you must agree that your entries will be licenced by the Creative Commons by Attribution licence: http://creativecommons.org/licenses/by/1.0/ -- #!/usr/bin/perl -T use strict; use warnings; print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};