Shawn McKinley wrote:
> Hello all,
> I am wondering if you can have object inherited between
> packages when the child packages have their own object
> creation without explicitly setting the parent object in
> the child? Is there a way to inherit the parent object?
> Example below (sorry for t
Hello again,
Replying to this one since it is the shortest... Thanks for the
responses...
The illustration, admittedly, was sparse at best master Drieux :-)
However, I do want to have independent instances beyond the A.pm.
Maybe I am making this too difficult, not sure yet, but I will do
some
Paul Kraus wrote:
> Code
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> &dhcpd;
>
> sub dhcpd {
> use Text::DHCPparse;
> use Net::SCP qw( scp iscp );
> my $scp = Net::SCP -> new( 'hylafax', 'pkraus' );
Could it be that you are using or die one line too late?
Joseph
--
To u
Gary Stainburn wrote:
> On Monday 05 January 2004 2:09 pm, Dan Anderson wrote:
> > > My problem is one of destroying a block (object), making sure that I have
> > > no memory leakage.
> >
> > Out of curiosity, when you say memory leakage do you mean that the
> > memory persists after the Perl proc
> "Tim" == Tim Johnson <[EMAIL PROTECTED]> writes:
Tim> find(sub{ -f and ( $size += -s ) }, $dir );
Beware that -s has only a rough correlation with the actual disk a
file takes. You want (stat)[12] for that. The -s number will be far
too huge for holey files (blocks aren't allocated), and
> "Ricardo" == Ricardo Pichler <[EMAIL PROTECTED]> writes:
Ricardo> Hi, I'm beginner in the perl world, I having see very files .pl to learn and
I have one question...
Ricardo> In this script, what do make the parts in bold?
Ricardo> #!/usr/bin/perl
Ricardo> use strict;
Ricardo> $|=0;
Ric
"R. Joseph Newton" wrote:
Whoops. Forgot the most important function. Inine
> Overall, I would suggest that you steer clear of internal references in your
> objects when possible. It is much better to make a container class, then delete
> contained objects from the container. Generally you wo
> "Shawn" == Shawn McKinley <[EMAIL PROTECTED]> writes:
Shawn> I am wondering if you can have object inherited between
Shawn> packages when
Objects don't get inherited. Objects inherit methods (subroutines)
from other classes (packages). Can you recast your question using
terminology tha
> "R" == R Huber <[EMAIL PROTECTED]> writes:
R> I am writing several subroutines that I want to make
R> available to other programs without directly including
R> the code in those programs. Can anyone explain how to
R> do this or where to go to find out how to do it.
Besides the bits and piec
> "Gary" == Gary Stainburn <[EMAIL PROTECTED]> writes:
Gary> I create a new track block such:
Gary> my $T1=Trainset->track('T1','Block');
Gary> This also created $Trainset::_BLOCKS{T1} which references the object.
Gary> My problem is how can I destroy the object when I no longer want it?
Y
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:
Rob> You could forget about diagnosing the problem and just use
Rob> my $n = unlink grep -f, glob '/test/directory/klee*';
Rob> print "$n files deleted\n";
Unless you're running an older Perl, where that'll fire off a shell
to do the glob(
> "Gary" == Gary Stainburn <[EMAIL PROTECTED]> writes:
Gary> Now when I wish to DESTROY the hash, I need to free the memory
Gary> used by the hash, including the two arrays _Links and _Signals.
Gary> Am I right in thinking that the arrays, along with the scalars
Gary> will be deleted by the g
Gary Stainburn wrote:
> Hi folks,
>
> My first forrey into Perl objects sees me trying to model a railway. I've got
> a hash of named blocks of track, which is added to when I create a new block
> object.
>
> My problem is one of destroying a block (object), making sure that I have no
> memory le
--- Daniel Staal <[EMAIL PROTECTED]> wrote:
>
> --As for the rest, it is mine.
>
> Well, if you are having problems I'd say yes. ;-)
>
> FTP has issues with firewalls. (The design doesn't work well with
> them.) If you are behind a firewall you probably only can do
> 'passive' ftp. Eithe
James Edward Gray II wrote:
> Since we didn't see anything outside of the constructor in the posted
> code, I assumed (possibly incorrectly) that $blocks was some form of
> class data. I see no problem with setting some class data from the
> constructor, if needed.
Good point. I'm afraid I enti
On Jan 5, 2004, at 1:48 PM, Johan Meskens CS3 jmcs3 wrote:
[..]
i create a datastructure in one.pl
and would like to make it travel to other.pl
so i can process the datastructure there
how do i go about it ?
a direction to point me to ?
pipe ? module ?
[..]
the first part of the problem is wheth
On Jan 5, 2004, at 6:30 PM, drieux wrote:
On Jan 5, 2004, at 2:51 PM, James Edward Gray II wrote:
sub new {
my $class = shift;
my $self = $class->SUPER::new( @_ }; # call class A constructor
--^
oopsie should have been a ")"
Good catch. Sorry
hola
i create a datastructure in one.pl
and would like to make it travel to other.pl
so i can process the datastructure there
how do i go about it ?
a direction to point me to ?
pipe ? module ?
i would like to keep the 2 files seperate
thanks for your help
jmcs3
--
To unsubscribe, e-mai
On Jan 5, 2004, at 2:51 PM, James Edward Gray II wrote:
On Jan 5, 2004, at 2:44 PM, Shawn McKinley wrote:
Hello all,
I am wondering if you can have object inherited between
packages when the child packages have their own object
creation without explicitly setting the parent object in
the child?
On Jan 5, 2004, at 2:44 PM, Shawn McKinley wrote:
Hello all,
I am wondering if you can have object inherited between
packages when the child packages have their own object
creation without explicitly setting the parent object in
the child? Is there a way to inherit the parent object?
Example be
--As off Monday, January 5, 2004 7:20 PM -0300, Ricardo Pichler is
alleged to have said:
Hi, I'm beginner in the perl world, I having see very files .pl to
learn and I have one question... In this script, what do make the
parts in bold?
Umm, Bold? You sent text/plain. There is no bold.
# !/u
Ricardo Pichler wrote:
>
> #!/usr/bin/perl
> use strict;
> $|=0;
> use vars qw (%WRRConf %DHCPDConf %IPTablesConf %GeneralConf
> %DBIConf %NetworkConf %IfCfgConf %WIPLConf
> %WANInitConf %LANInitConf
> %NetworkRemoteConf %WRRRemoteConf
Hi, I'm beginner in the perl world, I having see very files .pl to learn and I have
one question...
In this script, what do make the parts in bold?
#!/usr/bin/perl
use strict;
$|=0;
use vars qw (%WRRConf %DHCPDConf %IPTablesConf %GeneralConf
%DBIConf %NetworkConf %IfCfgCon
On Jan 5, 2004, at 12:44 PM, Shawn McKinley wrote:
Hello all,
I am wondering if you can have object inherited between
packages when the child packages have their own object
creation without explicitly setting the parent object in
the child? Is there a way to inherit the parent object?
Example b
William,
On Mon, 2004-01-05 at 12:32, [EMAIL PROTECTED] wrote:
> Are there any tools with the capabilities of (SFU 3.0) that allow users to
> transparently run ?[ULi]nix-based applications (say, shell scripts) from a
> Windows environment?
It's funny you wrote this today at this time, as I had ju
On Jan 5, 2004, at 12:32 PM, drieux wrote:
On Jan 5, 2004, at 10:49 AM, Paul Kraus wrote:
Code
#!/usr/bin/perl
use strict;
use warnings;
&dhcpd;
sub dhcpd {
use Text::DHCPparse;
use Net::SCP qw( scp iscp );
my $scp = Net::SCP -> new( 'hylafax', 'pkraus' );
$scp -> get ( 'dhcpd.leases
On Mon, 2004-01-05 at 15:03, drieux wrote:
> On Jan 5, 2004, at 9:32 AM, <[EMAIL PROTECTED]> wrote:
> [..]
> > I was wondering if anyone on this list have had any luck with this
> > technique of executing UNIX-based applications. One thing that comes
> > to
> > mind is CGI-scripting, but this is
Hello all,
I am wondering if you can have object inherited between
packages when the child packages have their own object
creation without explicitly setting the parent object in
the child? Is there a way to inherit the parent object?
Example below (sorry for the length).
TIA,
Shawn
A.pm
pac
On Jan 5, 2004, at 10:49 AM, Paul Kraus wrote:
Code
#!/usr/bin/perl
use strict;
use warnings;
&dhcpd;
sub dhcpd {
use Text::DHCPparse;
use Net::SCP qw( scp iscp );
my $scp = Net::SCP -> new( 'hylafax', 'pkraus' );
$scp -> get ( 'dhcpd.leases' ) or die $scp->{errstr};
print "hello\n
On Jan 5, 2004, at 9:32 AM, <[EMAIL PROTECTED]> wrote:
[..]
I was wondering if anyone on this list have had any luck with this
technique of executing UNIX-based applications. One thing that comes
to
mind is CGI-scripting, but this is not an option for me.
[..]
I agree with Tim that essentially y
From: "Paul Kraus" <[EMAIL PROTECTED]>
> I have both activestate windows native perl installed and the default
> cygwin perl.
>
> How can I have the cygwin shell use the windows perl rather then the
> cygwin compiled perl?
Most probably you just have to change the PATH system variable.
jenda
===
Code
#!/usr/bin/perl
use strict;
use warnings;
&dhcpd;
sub dhcpd {
use Text::DHCPparse;
use Net::SCP qw( scp iscp );
my $scp = Net::SCP -> new( 'hylafax', 'pkraus' );
$scp -> get ( 'dhcpd.leases' ) or die $scp->{errstr};
print "hello\n";
}
Error
-
Use of uninitilazed value in
I have both activestate windows native perl installed and the default cygwin
perl.
How can I have the cygwin shell use the windows perl rather then the cygwin
compiled perl?
Paul Kraus
---
PEL Supply Company
Network Administrator
---
800 321-1264 Toll
Gary Stainburn wrote:
>
> On Monday 05 January 2004 3:12 pm, Rob Dixon wrote:
> > Gary Stainburn wrote:
> [snip]
> > > sufficient, or will this still tie up memory? Is there a better way?
> >
> > Hi Gary.
> >
> > We really need to see your 'delete' and 'DESTROY' methods. But you can get
> > aroun
From: <[EMAIL PROTECTED]>
> My current working environment consists of Windows-XP boxes and Sun
> Servers. Users first log on through an Windows-XP terminal, and are
> then granted access to UNIX services through putty-eXceed. Once
> connected through eXceed, they run applications either through
On Jan 5, 2004, at 10:11 AM, Rob Dixon wrote:
James Edward Gray II wrote:
On Jan 5, 2004, at 9:24 AM, R. Joseph Newton wrote:
Gary Stainburn wrote:
sub new {
my $this=shift;# allow for CLASS->new()
my $class=ref($this) || $this; # or $obj->new();
The docs that suggested this
This is not really a Perl question, but I would say that your chances of
running UNIX apps directly off of a UNIX share are pretty slim. As for
the X-Windows, Xmanager from NetSarang works pretty well. You can run
X-Windows based applications from Windows.
-Original Message-
From: [EMA
Hello,
The start of another year means new projects and hence more questions.
Are there any tools with the capabilities of (SFU 3.0) that allow users to
transparently run ?[ULi]nix-based applications (say, shell scripts) from a
Windows environment?
My current working environment consists of
On Monday 05 January 2004 3:12 pm, Rob Dixon wrote:
> Gary Stainburn wrote:
[snip]
> > sufficient, or will this still tie up memory? Is there a better way?
>
> Hi Gary.
>
> We really need to see your 'delete' and 'DESTROY' methods. But you can get
> around the problem by setting $T1 to anything th
On Monday 05 January 2004 2:09 pm, Dan Anderson wrote:
> > My problem is one of destroying a block (object), making sure that I have
> > no memory leakage.
>
> Out of curiosity, when you say memory leakage do you mean that the
> memory persists after the Perl process exits, or just while it is
> ru
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address):
On Jan 5, 2004, at 10:44 AM, James Edward Gray II wrote:
DESTROY() is the traditionally accepted place to do something like
break a circular reference
Bzzzt! :-)
DESTROY can't be called *until* the circular reference is broken
(or the script exits and everything gets destroyed, regardless of
refc
James Edward Gray II wrote:
>
> On Jan 5, 2004, at 9:24 AM, R. Joseph Newton wrote:
>
> > Gary Stainburn wrote:
> >
> >> sub new {
> >> my $this=shift;# allow for CLASS->new()
> >> my $class=ref($this) || $this; # or $obj->new();
> >
> > The docs that suggested this are in the p
On Jan 5, 2004, at 9:24 AM, R. Joseph Newton wrote:
Gary Stainburn wrote:
sub new {
my $this=shift;# allow for CLASS->new()
my $class=ref($this) || $this; # or $obj->new();
The docs that suggested this are in the process of being deprecated.
It is not a
good idea to have obj
Gary Stainburn wrote:
> Hi folks,
>
> I'm working for the first time with object, my $self being a ref to an
> anonymous hash, i.e.
Couple not so good things here.
>
>
> sub new {
> my $this=shift;# allow for CLASS->new()
> my $class=ref($this) || $this; # or $obj->new();
Th
Gary Stainburn wrote:
>
> My first forrey into Perl objects sees me trying to model a railway. I've got
> a hash of named blocks of track, which is added to when I create a new block
> object.
>
> My problem is one of destroying a block (object), making sure that I have no
> memory leakage.
>
> I
Gary Stainburn wrote:
>
> > Gary Stainburn wrote:
> > > I'm working for the first time with object, my $self being a ref to an
> > > anonymous hash, i.e.
> [snip]
> > > Now when I wish to DESTROY the hash, I need to free the memory used by
> > > the hash, including the two arrays _Links and _Signal
The code below works. Thanks for the pointers on the unless loop,
haven't used that before. It appears that the limitation I was running
into was only on my Mac perl config; the code works fine under linux.
#!/usr/bin/perl -w
#open directory and load contents into hash
use strict;
my $dir="/te
On Jan 5, 2004, at 2:23 AM, [EMAIL PROTECTED] wrote:
I tried explicitly declaring DIR as an array, but I guess handles
don't do that. How do I load all of the directory into an array, or
more specifically why am I only getting half?
#!/usr/bin/perl
use strict;
use warnings;
my $dir = shift; #
Never mind Text-DHCPparse.
Paul Kraus
---
PEL Supply Company
Network Administrator
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 05, 2004 8:59 AM
> To: [EMAIL PROTECTED]
> Subject: Squid Log Parser
>
> For kicks I am try
> My problem is one of destroying a block (object), making sure that I have no
> memory leakage.
Out of curiosity, when you say memory leakage do you mean that the
memory persists after the Perl process exits, or just while it is
running? And have you verified this? And, is the program a daemon
Hi folks,
My first forrey into Perl objects sees me trying to model a railway. I've got
a hash of named blocks of track, which is added to when I create a new block
object.
My problem is one of destroying a block (object), making sure that I have no
memory leakage.
I create a new track block
For kicks I am trying to write a squid log parser. The access.log file is
the easy part. I am having trouble with translating the ip information in
the dhcpd.leases file. The way I see it I will need to read the file
backwards. Analyzing each lease block and skipping lease blocks which I have
alrea
On Monday 05 January 2004 1:37 pm, Rob Dixon wrote:
> Gary Stainburn wrote:
> > I'm working for the first time with object, my $self being a ref to an
> > anonymous hash, i.e.
[snip]
> > Now when I wish to DESTROY the hash, I need to free the memory used by
> > the hash, including the two arrays _L
Gary Stainburn wrote:
>
> I'm working for the first time with object, my $self being a ref to an
> anonymous hash, i.e.
>
> sub new {
> my $this=shift;# allow for CLASS->new()
> my $class=ref($this) || $this; # or $obj->new();
> my ($name,$type)[EMAIL PROTECTED];
> my $self=
IIRC, Perl's garbage collection system sits in the background waiting
until it finds a chunk of memory not referenced by any variable and then
deletes it. So references to anything keep the memory connected to the
reference in play until either Perl dies or there are no variables which
con
Hi folks,
I'm working for the first time with object, my $self being a ref to an
anonymous hash, i.e.
sub new {
my $this=shift;# allow for CLASS->new()
my $class=ref($this) || $this; # or $obj->new();
my ($name,$type)[EMAIL PROTECTED];
my $self={};
bless $self,$class;
I am trying to extend my perl skills to the point of being able to
create programs with GUIs. I found a tutorial to both GTK and TK -- but
the TK tutorial did in one line what the GTK tutorial did in many. I
was wondering what the pros and cons of TK and GTK were, and whether GTK
involves signifi
Charles Harvey wrote:
>
> I have a Mac client that is grabbing pictures and writing them
> to a netatalk share, and the files prefix with klee and then are
> one-up serialized (not my design, I just do networking). The PC
> client grabs the images via samba share and displays them. This
> is par
Asif Iqbal wrote:
>
> I am trying to relace any 7 digit number to to a new 7 digit number of
> which last two digits are 9
>
> lets pick a random 7 digit number as 1347236.
>
> so I want 1347236 --> 1347299 using perl
>
> I can do it with sed
>
> NUMBER=1347236
> NUMBER=`echo $NUMBER | sed 's/\([0-
> That looks very, very wrong. You're binding a scalar to
> something other than a regular expression. Tell us what you
> are attempting to do here.
>
> HTH,
>
> Charles K. Clarkson
yeah, I agree. Here is the scenario:
I have a Mac client that is grabbing pictures and writing them to a ne
On Jan 05 12:13, Ramprasad A Padmanabhan <[EMAIL PROTECTED]> wrote:
>
>
> But why do you want to do it in perl ( why not rm -f $dir/* $dir/.* )
> , If you are removing all the 4000 files everytime it might make sense
> to remove the entire directory and recreate it.
>
>
> Ram
>
That is what
Asif Iqbal wrote:
> Hi All
>
> I am trying to relace any 7 digit number to to a new 7 digit number of
> which last two digits are 9
>
> lets pick a random 7 digit number as 1347236.
>
> so I want 1347236 --> 1347299 using perl
>
> I can do it with sed
>
> NUMBER=1347236
> NUMBER=`echo $NUMBER
On Sun, 4 Jan 2004 [EMAIL PROTECTED] wrote:
> I'm running out of web space and want to write a script that tell me the size
> of certain directories so I can see where the hog is.
>
> Can anyone give me some quick code?
A shell script might be even faster with du -s /tmp | sort -n
Rus
--
e: [E
Hi All
I am trying to relace any 7 digit number to to a new 7 digit number of
which last two digits are 9
lets pick a random 7 digit number as 1347236.
so I want 1347236 --> 1347299 using perl
I can do it with sed
NUMBER=1347236
NUMBER=`echo $NUMBER | sed 's/\([0-9]\{5\}\)[0-9]\{2\}/\199/'`
s
65 matches
Mail list logo