Article View: pl.comp.lang.perl
Article #1111Re: Dylemat składniowy
From: Piotr Piatkowski
Date: Mon, 16 Mar 1998 14:39
Date: Mon, 16 Mar 1998 14:39
20 lines
1354 bytes
1354 bytes
Waldek Grudzień <waldekg@uhc.lublin.pl> wrote:
: niestety w przypadku obiektów zapis przykładowo :
: $q = new CGI;
: $str = "qwerty${q->param('parametr')}asdd";
: daje komunikat błędu :
: Can't locate object method "param" via package "query" at ././1.pl line 5,
: <> chunk 1.
: Czy jest sposób na zapisanie tego w przypadku obiektów (zamiast
: konkatenować $str1.$q->param('parametr').$str2 )
Jest, ale nie wiem czy poprawia on czytelność kodu. W każdym razie
robi się to tak:
"qwerty@{[$q->param('parametr')]}asdd"
--
Piotr Piątkowski, Uczelniane Centrum Informatyki, AGH Krakow, POLAND
Technical Details
Message-ID:
<6ejdi7$ouk$1@galaxy.uci.agh.edu.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!news.task.gda.pl!news.memax.krakow.pl!news.wnaft.agh.edu.pl!agh.edu.pl!agh.edu.pl!not-for-mailReferences:
<Pine.HPP.3.96.980313124903.24087C-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!news.task.gda.pl!news.memax.krakow.pl!news.wnaft.agh.edu.pl!agh.edu.pl!agh.edu.pl!not-for-mail From: Piotr Piatkowski <kompas@galaxy.uci.agh.edu.pl> Newsgroups: pl.comp.lang.perl Subject: Re: Dylemat składniowy Date: 16 Mar 1998 15:39:03 +0100 Organization: University of Mining & Metallurgy Lines: 20 Message-ID: <6ejdi7$ouk$1@galaxy.uci.agh.edu.pl> References: <Pine.HPP.3.96.980313124903.24087C-100000@clinicom.uhc.lublin.pl> NNTP-Posting-Host: galaxy.uci.agh.edu.pl Mime-Version: 1.0 X-Newsreader: TIN [UNIX 1.3 unoff BETA 971018; sun4m SunOS 5.5.1] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit