Skip Menu |
 

This queue is for tickets about the Filter CPAN distribution.

Report information
The Basics
Id: 54452
Status: resolved
Priority: 0/
Queue: Filter

People
Owner: RURBAN [...] cpan.org
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 24C934D8173 for <bug-Filter [...] rt.cpan.org>; Tue, 9 Feb 2010 16:56:11 -0500 (EST)
Received: (qmail 25617 invoked by uid 103); 9 Feb 2010 21:56:10 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 Feb 2010 21:56:10 -0000
Received: from mailout2-7.pacific.net.au (HELO mailout2.pacific.net.au) (61.8.2.230) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 09 Feb 2010 13:55:34 -0800
Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id BAC571E5281 for <bug-Filter [...] rt.cpan.org>; Wed, 10 Feb 2010 08:55:21 +1100 (EST)
Received: from blah.blah (ppp2424.dyn.pacific.net.au [61.8.36.36]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 2DA3627421 for <bug-Filter [...] rt.cpan.org>; Wed, 10 Feb 2010 08:55:21 +1100 (EST)
Received: from gg by blah.blah with local (Exim 4.71) (envelope-from <gg [...] zip.com.au>) id 1Ney3B-0001Mn-Ii for bug-Filter [...] rt.cpan.org; Wed, 10 Feb 2010 08:55:17 +1100
Delivered-To: cpan-bug+Filter [...] diesel.bestpractical.com
MIME-Version: 1.0
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)
Subject: filter_add() leave existing object blessing
X-Spam-Status: No, hits=0.0 required=8.0 tests=
Return-Path: <gg [...] zip.com.au>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Filter [...] rt.cpan.org
Date: Wed, 10 Feb 2010 08:55:16 +1100
X-Spam-Level: *
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/mixed; boundary="=-=-="
Message-ID: <87wrym2hx7.fsf [...] blah.blah>
To: bug-Filter [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Content-Length: 0
X-RT-Original-Encoding: ascii
content-type: text/plain; charset="utf-8"
Content-Length: 463
Download (untitled) / with headers
text/plain 463b
In Filter 1.37, if filter_add() is given an object which is already bless()ed I think it should not re-bless it into the callers class, but instead leave it as-is. Sample foo.pl and Foo.pm below prints before Foo=HASH(0x9b2a8c8) after Foo::Base=HASH(0x9b2a8c8) filter Foo::Base=HASH(0x9b2a8c8) where I hoped that package Foo could inherit an import() from Foo::Base (for all the usual code sharing etc reasons that a "base" class might be used).
Content-Type: text/x-perl
content-disposition: inline; filename="foo.pl"
Content-Length: 54
Download foo.pl
text/x-perl 54b
use lib '.'; use Foo; print "this is filtered out\n";
Content-Type: text/x-perl
content-disposition: inline; filename="Foo.pm"
Content-Length: 325
Download Foo.pm
text/x-perl 325b
package Foo; use strict; use warnings; our @ISA = ('Foo::Base'); package Foo::Base; use Filter::Util::Call; sub import { my ($class) = @_; my $self = bless {}, $class; print "before $self\n"; filter_add ($self); print "after $self\n"; } sub filter { my ($self) = @_; print "filter $self\n"; return 0; } 1;
MIME-Version: 1.0
In-Reply-To: <87wrym2hx7.fsf [...] blah.blah>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <87wrym2hx7.fsf [...] blah.blah>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-23623-1364998748-1774.54452-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 901
Download (untitled) / with headers
text/plain 901b
I've added this feature to 0.50, which is currently only on github. Please review and test it before I release it to the public. https://github.com/rurban/Filter You might think that this changed feature will break some code. This is a major change, but I found no use counter examples which would break, and the advantages are convincing. On Tue Feb 09 16:56:49 2010, user42@zip.com.au wrote: Show quoted text
> In Filter 1.37, if filter_add() is given an object which is already > bless()ed I think it should not re-bless it into the callers class, but > instead leave it as-is. Sample foo.pl and Foo.pm below prints > > before Foo=HASH(0x9b2a8c8) > after Foo::Base=HASH(0x9b2a8c8) > filter Foo::Base=HASH(0x9b2a8c8) > > where I hoped that package Foo could inherit an import() from Foo::Base > (for all the usual code sharing etc reasons that a "base" class might be > used). >
-- Reini Urban
MIME-Version: 1.0
In-Reply-To: <87wrym2hx7.fsf [...] blah.blah>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <87wrym2hx7.fsf [...] blah.blah>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-6121-1401901320-1269.54452-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 42
1.50 now released. Thanks -- Reini Urban


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.