On 16 October 2010 21:32, Hans Dieter Pearcey <h...@pobox.com> wrote:
> On Sat, 16 Oct 2010 20:29:32 +0100, Fergal Daly <fer...@esatclear.ie> wrote:
>> use Test::Deep2 qw($deep); # import the "module" as $deep
>>
>> $deep->is_deeply($foo, $deep->set([1,2,3,4]));
>
> Or, without requiring any special exported symbol:
>
>    use aliased 'Test::Deep2' => 'Deep';
>    Deep->is_deeply($foo, Deep->set([1,2,3,4]));

Looking at the module I wrote but didn't release, I find aliased in my
SEE ALSO section :)

> Sadly, the functions all then have to be written as class methods.

Which would break all the current users.

http://search.cpan.org/~ovid/aliased-0.30/lib/aliased.pm#Why_OO_Only?

describes exactly the problem I hit. You can't make functions and
methods available through the same symbol unless you know which is
which. Also you cannot give access to variables etc so I just gave up,

F

> hdp.
>

Reply via email to