🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #842

Re: Dziedziczenie obiektów (moduły w PERL'u)

#842
From: Jacek Ablewicz
Date: Mon, 29 Dec 1997 12:40
30 lines
1690 bytes
In pl.comp.lang.perl Waldek Grudzien <waldekg@uhc.lublin.pl> wrote:

: Mam następujący kłopot :
: Próbuję napisać moduł, który dziedziczyłby metody z innego modułu
: (obiektu). Treść modułu wygląda następująco :
: -------------------------------
: package DBR;

: use Pg;
: use strict;
: @ISA = qw(Pg);
: [dalej treść ...]
: -------------------------------

: Po próbie uruchomienia skryptu z wykorzystaniem tego modułu 
: (komenda use DBR; (oczywiście w linii 4)) wyskakuje komunikat :

: -------------------------------
: Global symbol "ISA" requires explicit
: package name at DBR.pm line 5.
: Compilation failed in require at ./t.pl line 4.
: BEGIN failed--compilation aborted at ./t.pl line 4.
: -------------------------------

Kłopot chyba w "use strict", jeśli tak (czy te same objawy daje 
perl -w DBM.pm ?) to powinno pomóc np. "no strict 'vars'", albo lepiej
"use vars qw( @ISA )".

--
Jacek A.
Technical Details
Message-ID: <6885nm$3dh$1@info.cyf-kr.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uucp-gw.cyf.gov.pl!news.memax.krakow.pl!cyfronet!bib.biblos.pk.edu.pl!not-for-mail
References: <Pine.HPP.3.96.971229075637.10451B-100000@clinicom.uhc.lublin.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uucp-gw.cyf.gov.pl!news.memax.krakow.pl!cyfronet!bib.biblos.pk.edu.pl!not-for-mail
From: ablewicz@bib.biblos.pk.edu.pl (Jacek Ablewicz)
Newsgroups: pl.comp.lang.perl
Subject: Re: Dziedziczenie obiektów (moduły w PERL'u)
Date: 29 Dec 1997 12:40:22 GMT
Organization: Academic Computer Centre CYFRONET - Krakow
Lines: 31
Message-ID: <6885nm$3dh$1@info.cyf-kr.edu.pl>
References: <Pine.HPP.3.96.971229075637.10451B-100000@clinicom.uhc.lublin.pl>
NNTP-Posting-Host: bib.biblos.pk.edu.pl
Mime-Version: 1.0
X-Newsreader: TIN [UNIX 1.3 unoff BETA release 960713]
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit