$1 there probably won't do
Jonathan> what you expect. Also, \1, \2, \3 only takes you as far as \9 ;-)
Wrong. If you have more than 10 parens visible so far, \10 works just fine.
Jonathan> If $1 could be made to work properly on the LHS of s///, I'd vote for
Jonathan> that being
integrate it into perl6.
CGI 3.01 is in the CPAN. I can't run it until 5.6.1 comes out though.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy
now. You disrespect
him when you suggest the process is being undermined.
David> I _choose_ not to be paying for perl by 2005.
And Larry will ensure that. If you can't trust him to do that, please
stop using Perl now, to cut your losses.
--
Randal L. Schwartz - Stonehenge Consulting Servic
experience. I think the current definition is precisely
predictable in all circumstances. If you start adding special-case
rules, you'll lose. Big time.
No bug. Just a feature you don't (yet) understand.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAI
ut it's a pretty consistent overriding factor.
If you want something odd like "not necessarily the leftmost", then
you'll need to speak more. But "leftmost" is fundamental to the
design of regex. Don't mess with that. Or don't call it a regex an
p the
Deven> match as short as possible".
No, that's an incorrect description. No wonder you are confused.
Deven> Am I really the only one who views it this way? Must I stand
Deven> alone?
Yes. Go stand in the corner. :)
Deven> If we lived in that ideal world, what behavior would be
Deven> expected and preferred?
The current one. If you muck with "leftmost match wins", not only
will you break most existing programs, you will SLOW EVERYTHING DOWN,
because we have to keep going on even after we already have a match!
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
t;I respectfully dissent." Just because I don't
Deven> perfectly agree with the semantics that were chosen doesn't
Deven> mean I don't understand them.
You don't understand the motivation, apparently. That's what I'm
referencing.
--
Randal L. Sch
d? Or is this already
Ian> possible in Perl 5 but I have missed it?
my $methref = sub { $foo->method(@_) };
You missed it. :) Just be sure that $foo is not a package variable,
so that a proper closure is created.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
arguments that omit their parentheses swallow up
Peter> the following list.
*some* functions. localtime doesn't. my is a unary function, prototyped
vaguely as (\$) or (\@) or (\%).
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]
t not *by*
me (in fact, actually to spite me, if I recall).
Although it is fun when we get to the "Schwartizian Transform Illustrated"
page in my slideset... I get to say "don't wait for the swimsuit issue...
it's not a very pretty sight".
--
Randal L. Schwartz - Stone
] cmp $b->[1] } { uc } @list;
or to sort on GCOS and then username of password lines:
@sorted = sort { $a->[5] cmp $b->[5] or $a->[1] cmp $b->[1] }
{ split /:/ } `cat /etc/passwd`;
That captures the canonical ST pretty well, where $a->[0] is always
the original element.
d named "Ian", so I can see on a roster some day:
Schwartz,Ian
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See
aning of the word "works". Ever try this:
@foo[0] = ;
and then wonder where all the *rest* of your input went?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consult
From: [EMAIL PROTECTED] (Randal L. Schwartz)
Date: 25 Apr 2001 07:23:44 -0700
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Lines: 50
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
>>>>
27;s the "tiny language" buried within this
large language? I bet I can still give you the "first 40 hours that
everyone needs starting with Perl6" in a 250-page book, and it'll
still cover 80% of what everyone needs for 80% of the programs. I bet
about 75% will be the same
#x27;re not bytes, we can't call it bytecode.
Unless you want to raise the "octet means 8 bits, byte means whatever
is nice and chunky" argument. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/m
onal concepts. An anon
sub is not necessarily a closure. A closure is not necessarily an
anon sub. Unfortunately, there were some casual misuses of the terms
early on, and it stuck into some of the early docs and mindsets.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<
one think of anything better? They seem rather lame. (Bonus points
Dan> for clever acronyms gotten without strain, or puns in any human
Dan> language)
.par = parrot/(Perl?) assembly repository
.rot = runtime object tote
.pl => .par => .rot => ...
:-)
--
Randal L.
>>>>> "Simon" == Simon Cozens <[EMAIL PROTECTED]> writes:
Simon> Actually, I'm trying to make the bytecode magic be 0x13155A1.
Can you swing a cluestick in my direction? Whuh?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +
you wrote { EXPR; EXPR; EXPR; }.
This seems to be the most natural approach. Define statement as
expression followed by semicolon. Don't try to take the Pascal approach
of "semicolon is statement separator". Take the *C* approach.
--
Randal L. Schwartz - Stonehenge Consulti
>>>>> "John" == John Siracusa <[EMAIL PROTECTED]> writes:
John> On 9/18/01 7:26 PM, Randal L. Schwartz wrote:
>> I'd suggest you "Darwin" there to be sure you're thinking about
>> case-insensitive-32-char filenames
John> Some
ute (like maybe calling a database).
For these scenarios, specifying the sort comparison will be simpler
and cheaper than specifying the sort key.
So, we need both, but if we get only one, the Perl5 way is superior.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://
(let
me tell you how to sort two items), you'll still need a very perl5-ish
interface.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
evel::Cover, to see if your tests tickle the
code paths?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Please, let us agree to use the traditional name of "environment variables" in
the docs, and not re-introduce its bastardized cousin, which hurts my ears.
Thanks.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/&
$foo" be called
"environmental variables", you're cruisin' for a world of hurt, and I say this
as someone who will have to document this and teach this to a group of newbies
for every week of my upcoming life.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc.
ecome Berne-convention parties now, so it really means nothing.
It never meant "rights" in a licensing point of view, so while your actions
are agreeable, your motivation is misplaced. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.c
ement as a true normal if/while instead of a backwards
if/while, and it *does* help the overall readability.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
Se
't throw out the simplicity of CGI.pm's basic task handling: parsing
the incoming parameters (including file upload), and generating sticky forms
and other common HTML elements.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
>>>>> "Smylers" == Smylers <[EMAIL PROTECTED]> writes:
Smylers> No: no aliases. Perl does not have a tradition of these,
except "for"/"foreach". :)
But I agree with the rest of your position.
--
Randal L. Schwartz - Stoneh
r" or "redirect" or
"cookie" to do that "last bit" of my application. CGI.pm has the *right*
mix for small tasks. It *does* make sense.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
the programmer. It's almost like "echo"
Fagyal> in PHP :))) I used CGI.pm with simple cgi scripts, with Apache::ASP,
Fagyal> mod_perl and FCGI, I used CGI::Cookie, etc. yet I never needed those
Fagyal> HTML generating methods. To me, it feels wrong that they are
Fag
on find it? This works
even for select-multiple forms, which is very nice.
That's why the *tight* integration of incoming parameters and HTML
form generation is a Good Thing. 90% of the time, it just Works.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
>>>>> ""A" == "A Pagaltzis" <[EMAIL PROTECTED]> writes:
"A> * Randal L. Schwartz [2006-09-20 19:30]:
>> "Fagyal" == Fagyal Csongor <[EMAIL PROTECTED]> writes:
>>> yet I never needed those HTML generating met
plate? I've already done a Scheme proof
pdcawley> of concept after all...
This is already a thread on perlmonks.org... see user "ovid".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
ill have to
change.
Anyone have a spare supply of irons? Mine are all in the fires already. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, et
>>>>> "Simon" == Simon Cozens <[EMAIL PROTECTED]> writes:
Simon> What were the good reasons for not allowing localized lexicals in Perl 5?
Nobody could explain it in 50 words or less.
"What the hell is 'local my $foo = 35'?"
--
Randal L
ash = @somelist.inject({}, { $^a{$^b} = 1; $^a });
That'd be Way Cool. Once you get your head around inject, you never
want to go back to reduce. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulti
>>>>> "Randal" == Randal L Schwartz writes:
Randal> For example, if I wanted the identity hash (where all values are 1,
Randal> but keys are original list elements), I could do:
Randal> my %hash = @somelist.inject({}, { $^a{$^b} = 1; $^a });
And yes, I k
>>>>> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes:
Michael> Nearest Krispy Kreme is in Beaverton on RT 26 or Clackmas
Michael> just off 205. Hmmm, chromatic lives in Beaverton...
So do I, but I'm not allowed *near* that place.
--
hat are used by that object as the execution platform varies.
This is similar to the OS-9's "gestalt" tables, which got smarter as
the operating system had more features, but was a consistent way to
ask "do we have a color monitor here?".
Is something like this already pl
foo[0-9][0-9] yields foo00, foo01, ...
Rich> I'm wondering whether Perl should have a similar capability, using REs.
Well, here's a cheap way:
my @list = glob ('foo{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}');
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services,
;t use it. Can someone give an example of an actual, proper, use?
It was to make "pass by reference" easier, before prototypes if I recall:
myfunc \($a, @b, %c);
which means the same as if we had said:
sub myfunc (\$ \@ \%);
myfunc($a, @b, %c);
Except that
as much as is practically (and legally) possible.
Stonehenge has been a major contributor to YAS. I don't see why we
should start changing plans in midstream.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/mer
I'm asking for in my quest is to keep the "install health check"
tests down to a minute or two. Remember that CPAN.pm insists that
"make test" works before I can install.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]&g
and for that I'm quite
Dan> sorry.
For some variant definition of "nobody on-list" with which I'm
not familiar.
But I think I know what you mean. :)
Just another underobserved tech-editor from said book, :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 50
>>>>> "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:
Andrew> Randal L. Schwartz wrote:
>> All I'm asking for in my quest is to keep the "install health check"
>> tests down to a minute or two. Remember that CPAN.pm insists tha
g new ground here. Has anyone done this already
and could pass along pointers, or better yet, working code?
[Aside - is Test::Cmd considered current tech? It hasn't been updated
in two years... is there a better way?]
Thanks.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 50
>>>>> "Darren" == Darren Chamberlain <[EMAIL PROTECTED]> writes:
Darren> * Randal L. Schwartz [2003-07-21 13:21]:
>> It occurs to me that that if I wanted to build a health check watchdog
>> for my system (a script that executes at regular intervals
find it lacking for typical documentation.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
of the
regex to properly be a token).
Please see the referenced perlmonks article.
All the handwaving in the world won't fix this. As long as we have
dual-natured characters like /, and user-defined prototypes, Perl
cannot be lexed without also parsing, and therefore without also
running BEGI
between /-as-divide
Matthew> and /-as-regex becomes much easier if lookahead is employed in the
Matthew> tokeniser.
No, not possible at all. The entire rest of the program may be valid
either way. You *must* know by the time you're done with /, or
/-and-more. The rest of the code cann
>>>>> "Larry" == Larry Wall <[EMAIL PROTECTED]> writes:
Larry> The shifts are all X< rather than X<< to avoid confusion with Texas
Quotes.
I've been staring too much at POD lately. I saw both of those as very
broken pod-start marks. :)
--
Ran
>>>>> "Tony" == Tony Bowden <[EMAIL PROTECTED]> writes:
Tony> Negative quality for anyone whose files appear to have been edited in
Tony> emacs!
Now, them's fightin' words!
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 77
coding of them, so set_url_encoding will run too
BÁRTHÁZI> late.
Did I miss the memo where anything outside the list of valid
URI characters needed to be hexified, hence there's no need
for such a URL encoding scheme? Where is this memo?
--
Randal L. Schwartz - Stonehenge Consulting Se
mo?
BÁRTHÁZI> Can you write it again with other words? Both Stevan and me are not
BÁRTHÁZI> understand.
URLs are only 7 bit ASCII, according to the RFCs. Did I miss a new RFC
where non-7-bit URLs are permitted? If so, please point to that.
--
Randal L. Schwartz - Stonehenge Consulting
ng in modules, but
in 10 line scripts, they show up quite frequently.
This undermines the rest of your request.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing
the construction jobsite to figure out
the length of a 2x4 crossbeam if you already have the blueprints in
front of you.
Unless you like to waste gas. :-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn
tches would
Larry> then automatically be assumed to be in Perl 6.
Boy, when Larry says "I get the colon", he really had plans for it.
:-)
Perl8 will look like:
:: : : :: :: ::: :;
(note the semicolon line terminator, to be replaced by a
>>>>> "Rafael" == Rafael Garcia-Suarez <[EMAIL PROTECTED]> writes:
Rafael> BTW, isn't the habit to post to c.l.p.announce a bit deprecated now ?
Not at all. More people should do it. Don't remove it.
Either that, or entertain a proposal
>>>>> "mAsterdam" == mAsterdam <[EMAIL PROTECTED]> writes:
mAsterdam> Randal L. Schwartz wrote:
>>> BTW, isn't the habit to post to c.l.p.announce a bit deprecated now ?
>> Not at all. More people should do it. Don't remove it.
ried amongst cooperating NNTP servers, but it doesn't have the same
status as a group that begins "comp.*", which is run by more-or-less
formal means according to Usenet policy.
Hence, my puzzlement. I was talking about a Usenet group (and
starting the formal process to abandon i
for me to
determine if this .tar.gz is worth unpacking.
Of course, if you have a well-written name/synopsis/author info,
I guess this is enough. But now we've just shifted the problem.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]>
IP_LONG_TESTS seems like a clear
Michael> name.
As long as it's consistent, and I can set it easily in CPAN.pm without
having to write a wrapper (via make_arg).
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge
used, and recognized immediately). But when people started
nesting them, the code became incredibly unreadable quickly, so
no-nesting for Perl was a deliberate choice, not an implementation
detail.
Unless Larry has come up with an overwhelming reason to permit them
after years of not having the
actually consider that an annoying statement. I have to back up
three times to figure out what it means.
I think Larry was on the right track here.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
>>>>> "Randal" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
Randal> I actually consider that an annoying statement. I have to back up
Randal> three times to figure out what it means.
And before someone whips out the Schwartzian Transform to undermin
like symlinks) than about individual file properties.
Should my test come with a tar file that gets extracted? Should I
build a small tree on the fly?
Any thoughts would be appreciated.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.st
want someone extracting
this as joebloe to fail because the uid wasn't root. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Ss in the
Barbie> same position.
It's not my intention to make this unix-only. It's a wrapper around
File::Find, so it should work anywhere File::Find works.
I'll look at the way File::Find tests itself for portability guidence.
--
Randal L. Schwartz - Stonehenge Consu
t not necessarily everything
that it meant.
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
;m currently using RSSLite, but I want it to be programmable, darn it!)
Not this month though.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy,
So is there anything we can leverage from
http://ivm.sourceforge.net/
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc.
them, but at least you can see them as separate files. And no
collisions from the Unix side!
So, foo, Foo, and FOO would be stored as "foo" "Foo\0" and "FOO\0\0",
effectively.
Is there anybody I can write at Apple to beg for this?
--
Randal L. Schwar
>>>>> "John" == John Siracusa <[EMAIL PROTECTED]> writes:
John> (Can I pre-order the Perl 6 Camel or what? ;)
Of course. You'll almost certainly visit the nodes before the subnodes
in the documentation.
:-)
--
Randal L. Schwartz - Stonehenge Cons
always the system primitives used by the debugger (and
for other reflection), with names like instVarAt: and instVarAt:put:.
Anybody can send them!
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.co
gel> Instead of
Angel> foreach @arr -> $item {...}
Larry considered that, and declined. Not sure of the reasons.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Tech
will have its own
PRE/POST, and then there's no need to inherit it. If you don't call
"super", how do you know the PRE/POST of a similar subroutine in a
superclass that you're completely overriding should even apply?
So, does it make any sense at all to talk about "
>>>>> "Larry" == Larry Wall <[EMAIL PROTECTED]> writes:
Larry> @result = for @a; @b -> $a, $b { $a op $b }
Larry> (presuming we make C actually act like C).
Why not just make map do that?
--
Randal L. Schwartz - Stonehenge Consulting Services,
>>>>> "Damian" == Damian <[EMAIL PROTECTED]> writes:
Damian> @result = {block}^.(@data);
But "hyperdot sort hyperdot" doesn't roll off the tongue as easy as
"map sort map"!
:-)
--
Randal L. Schwartz - Stonehenge Consultin
Can someone have Santa Claus explain it to
me?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
>>>>> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes:
Michael> This, too, is a joke.
I'm laughing at myself in the mirror. Does that help?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED
rue.
Maybe in the interest of huffman encoding, we could make it "even_though". :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
ology {
Piers> ... { $self.ish }
Piers> }
Piers> }
Piers> }
You could use the Smalltalk way by defining method myself in UNIVERSAL,
which simply returns self. So ".myself" would always be yourself,
which you could store if needed.
--
Randal L. Schwart
>>>>> "David" == David Whipp <[EMAIL PROTECTED]> writes:
David> If every object has a C method (C?), then you could
David> always call class-methods as class.m2().
Wouldn't that be .class.m2(), or did I miss something in the flurry?
--
Randal L. Schw
> "Dan" == Dan Sugalski <[EMAIL PROTECTED]> writes:
Dan> (Or maybe attributed string eval, like:
Dan> $foo = eval.Parrot sub I0, I0, 5
Dan>EOP
That would make more sense to me (for whatever that's worth) as
$foo = Parrot.eval < http:
I'd love to have it sooner rather than
David> later.
Not in 5.8, which is in the final freezy stages.
Perhaps in 5.9 thus 5.10.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix
t, your comment that it should always be scalar is cool,
but would prevent the code I'm giving right here from running.
So is that something we've agreed, that lvalue subs are *always*
scalars? That'd mean we can move on to the various implementation
details. :)
--
Randal L. Sch
g your subroutine before
evaluating the right side of the code (so it can return a scalar/list
flag of some kind), thereby breaking the normal model of assignment
where the right side gets run first?
This is the sticky point that keeps hanging up lvalue subs. Perl's
context transfer on th
on't like the literal $ME. It usurps a variable name that
has been legal for customer use in prior Perls. Why not use something
more "system-belonging" like %_ or even $_? In fact, "self" in $_ and
"args" in @_ has a nice symmetry. Or we make $_->{self} be
have a separate "method" type.
Oooh. Getting better all the time! Or maybe just return undef, and
let the method call fail on the undef, or we could check it ahead:
if (my $me = self) {
$me->do_this
} else {
$CGI::Q->do_this
}
To steal
$a == "" $b)
so that it's DEFINITELY a string comparison.
No, let's not set Perl back 13 years, thank you very much.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/secur
>>>>> "Larry" == Larry Wall <[EMAIL PROTECTED]> writes:
Larry> Randal L. Schwartz writes:
Larry> : if ($a == $b) { ... } # should this be string or number comparison?
Larry> Actually, it's a syntax error, because of the ... there. :-)
Larry
match a substring, and
Joe> then call an arbitrary function in the middle of a pattern match,
Joe> and to back out the call if the match failed.
Already done in 5.6. :) "perldoc perlre".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECT
me, using Larry's new ... operator :-)
Bart> No you didn't. You typed four dots.
That was the decimal version.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulti
self" is one char shorter than
Nathan> "shift"! ;-)
Heh! All that typing I would have saved over the years, would
probably be equal to the number of characters I've typed here
debating this point. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
reaction to this proposal. "If you like Python,
you know where to find it, but let us have some primitive data types
in Perl that act primitive so we can optimize things."
Here's hoping I don't have to prove that, and Larry will just reject
this proposal outright. :)
--
Randal
OO perishPolitely "ls failed: $boogeyman"++
Nathan>*/
Heh ... flashback to the V7 Bourne shell (the One True Shell) source
code, written in Algol, #define'd so that it would compile with C. :)
Truly a masterpiece of well-intended-but-poorly-executed famous last words. :)
-
k about which single element to pull
out.
Since there's no general rule for converting a scalar to a list
(there's only twenty or so specific rules :), there's no consistent
way to take this coerced "list in a scalar context" and wrangle it
back to a scalar!
"list&
>>>>> "Perl6" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:
Perl6> This RFC proposes that the second argument to C be made
Perl6> mandatory, and that its semantics be enhanced slightly to cover a
Perl6> common, ugly, and frequently buggy usage.
Y
1 - 100 of 120 matches
Mail list logo