Charles K. Clarkson wrote:
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I'm currently going through and cleaning up all my code
: and moving all common code to my module.
Get used to doing it. In about a year you'll wonder
why you did it that way and how you did anything with
such terrible
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I'm currently going through and cleaning up all my code
: and moving all common code to my module.
Get used to doing it. In about a year you'll wonder
why you did it that way and how you did anything with
such terrible programming.
:)
Charles
Wiggins d'Anconia wrote:
Andrew Gaffney wrote:
[snip]
Really, I'm the only user of my code. I don't expect to get replaced
anytime soon as my boss also doubles as my father ;) Besides, I
certaintly don't want to make things easier for my replacement (if
there ever is one).
Sorry for the old po
Andrew Gaffney wrote:
[snip]
Really, I'm the only user of my code. I don't expect to get replaced
anytime soon as my boss also doubles as my father ;) Besides, I
certaintly don't want to make things easier for my replacement (if there
ever is one).
Sorry for the old post, but this last senten
> -Original Message-
> From: zsdc [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 2 March 2004 4:54 PM
> To: Andrew Gaffney
> Cc: 'beginners'
> Subject: Re: subroutine definitions
>
> Andrew Gaffney wrote:
>
> > zsdc wrote:
> >
> >&g
Andrew Gaffney wrote:
zsdc wrote:
Confusion? You should read 6th Apocalypse by Larry Wall and the
appropriate Exegesis by Damian Conway:
http://dev.perl.org/perl6/apocalypse/A06.html
http://dev.perl.org/perl6/exegesis/E06.html
Now, _that_ is confusing. :)
I think that's an understatement. Blood
From: WC -Sx- Jones <[EMAIL PROTECTED]>
> Andrew Gaffney wrote:
>
> >> http://dev.perl.org/perl6/apocalypse/A06.html
> >> http://dev.perl.org/perl6/exegesis/E06.html
> >>
> >> Now, _that_ is confusing. :)
> >
> >
> > I think that's an understatement. Blood is coming out of my ears
> > after read
Andrew Gaffney wrote:
http://dev.perl.org/perl6/apocalypse/A06.html
http://dev.perl.org/perl6/exegesis/E06.html
Now, _that_ is confusing. :)
I think that's an understatement. Blood is coming out of my ears after
reading a few pages of the first one...
Hmmm; in fact all Perl people should be ha
zsdc wrote:
Confusion? You should read 6th Apocalypse by Larry Wall and the
appropriate Exegesis by Damian Conway:
http://dev.perl.org/perl6/apocalypse/A06.html
http://dev.perl.org/perl6/exegesis/E06.html
Now, _that_ is confusing. :)
I think that's an understatement. Blood is coming out of my ear
zsdc wrote:
I see [your] point. Perl 5 prototypes were invented mostly
to make things like $x = pop @array work but there is nothing you can do
with prototypes which you cannot do without them, only with different
function call syntax.
In fact, prototypes are not even needed to restrict argument
R. Joseph Newton wrote:
I would see this in a more positive light, perhaps, if prototypes were more
required for all functions, particularly if they offered named formal
parameters. In those circumstances, prototypes would offer great benefits of
clarity, since one could always refer to the signa
R. Joseph Newton wrote:
Got it. I'll still stick with what I said, though. This "feature" offered by
Perl prototypes strikes me as primarily a seed of confusion.
Confusion? You should read 6th Apocalypse by Larry Wall and the
appropriate Exegesis by Damian Conway:
http://dev.perl.org/perl6/apoc
zsdc wrote:
> R. Joseph Newton wrote:
> > "Charles K. Clarkson" wrote:
> >
> >> Here begins my problems with prototypes. Let's try
> >>this sample script:
> >
> >>sub generate_report_html([EMAIL PROTECTED]@);
> >
> > which could also be written:
> > sub generate_report_html($$$);
> >
> > with mu
R. Joseph Newton wrote:
"Charles K. Clarkson" wrote:
Here begins my problems with prototypes. Let's try
this sample script:
sub generate_report_html([EMAIL PROTECTED]@);
which could also be written:
sub generate_report_html($$$);
with much greater clarity.
This is not the same. A '$' in the sub
"Charles K. Clarkson" wrote:
>Here begins my problems with prototypes. Let's try
> this sample script:
>
> sub generate_report_html([EMAIL PROTECTED]@);
which could also be written:
sub generate_report_html($$$);
with much greater clarity.
>
>
> my $title= 'foo';
> my @column_names
Charles K. Clarkson wrote:
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: package Skyline;
:
:
:
: sub generate_report_html([EMAIL PROTECTED]@) {
:my ($title, $columns, $data) = @_;
Here begins my problems with prototypes. Let's try
this sample script:
sub generate_report_html([EMAIL PRO
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: package Skyline;
:
:
:
: sub generate_report_html([EMAIL PROTECTED]@) {
:my ($title, $columns, $data) = @_;
Here begins my problems with prototypes. Let's try
this sample script:
sub generate_report_html([EMAIL PROTECTED]@);
my $title
"R. Joseph Newton" wrote:
>
> Andrew Gaffney wrote:
> >
> > sub generate_report_html([EMAIL PROTECTED]@) {
> >my ($title, $columns, $data) = @_;
>
> $data is prototyped as an array/list, but you receive it here as a scalar. If
> you must use the damned prototype, it should be:
> sub generate
R. Joseph Newton wrote:
Andrew Gaffney wrote:
R. Joseph Newton wrote:
I am writing a module that contains functions that I commonly use in my scripts. I have
written a lot of scripts that generate HTML reports from the data in the MySQL DB. My
boss
wants these reports to spit out their data eith
James Edward Gray II wrote:
On Feb 28, 2004, at 7:05 PM, Andrew Gaffney wrote:
I'm getting conflicting advice between your post and another post to
this thread. Maybe if I post my code, you can recommend the best way
for me to setup my functions and the calls to them (and whether to
prototype t
Andrew Gaffney wrote:
> R. Joseph Newton wrote:
>
> I am writing a module that contains functions that I commonly use in my scripts. I
> have
> written a lot of scripts that generate HTML reports from the data in the MySQL DB.
> My boss
> wants these reports to spit out their data either in HTM
On Feb 28, 2004, at 7:05 PM, Andrew Gaffney wrote:
I'm getting conflicting advice between your post and another post to
this thread. Maybe if I post my code, you can recommend the best way
for me to setup my functions and the calls to them (and whether to
prototype them). This code will be for
R. Joseph Newton wrote:
Andrew Gaffney wrote:
I'm not exactly a beginner. I've been using Perl for about 8 months. It's just that
I've
never written a subroutine where I need to pass array or hash *references*.
Regardless of how long you have been writing in Perl, if you have not yet:
Star
Andrew Gaffney wrote:
>
> Charles K. Clarkson wrote:
> > Andrew Gaffney <[EMAIL PROTECTED]> wrote:
> > :
> > : I'm trying to write a subroutine that takes two scalars and two
> > : arrays as parameters. I've read that if you try to do this in a
> > : function, both arrays will get combined within
Andrew Gaffney wrote:
>
> I'm not exactly a beginner. I've been using Perl for about 8 months. It's just that
> I've
> never written a subroutine where I need to pass array or hash *references*.
Regardless of how long you have been writing in Perl, if you have not yet:
Started using strict a
In a message dated 2/28/2004 3:28:55 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:
> - Stop using prototypes. You'll find it easier to write perl
> programs without them.
Prototypes are useful and sometimes necessary, as in the supplied problem.
What would be called
my_subroutine($sc
Charles K. Clarkson wrote:
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I'm trying to write a subroutine that takes two scalars and two
: arrays as parameters. I've read that if you try to do this in a
: function, both arrays will get combined within '@_'.
Andrew,
- Stop using prototypes. You'l
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I'm trying to write a subroutine that takes two scalars and two
: arrays as parameters. I've read that if you try to do this in a
: function, both arrays will get combined within '@_'.
Andrew,
- Stop using prototypes. You'll find it easier to write
Andrew Gaffney wrote:
>
> I'm trying to write a subroutine that takes two scalars and two arrays as
> parameters. I've
> read that if you try to do this in a function, both arrays will get combined within
> '@_'.
All the values, including the two scalars, will be combined in a single
list and b
29 matches
Mail list logo