[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Re: help on plugin
- Subject: [EP-tech] Re: help on plugin
- From: yurj at alfa.it (Yuri)
- Date: Wed, 07 Nov 2012 17:26:09 +0100
- In-reply-to: <EMEW3|02d2dc9eeb2f2102e7a427c9caa005dboA6GEN14eprints-tech-bounces|ecs.soton.ac.uk|509A8885.50802@alfa.it>
- References: <509A8885.50802@alfa.it> <EMEW3|02d2dc9eeb2f2102e7a427c9caa005dboA6GEN14eprints-tech-bounces|ecs.soton.ac.uk|509A8885.50802@alfa.it>
I answer to myself:
my $repo_name = $self->{session}->{repository}->{id};
using
$Data::Dumper::Maxdepth = 2;
print Data::Dumper::Dumper($repo_name);
I've been able to debug and see what I can get from self->{session} :)
Il 07/11/2012 17:12, Yuri ha scritto:
> Hi!
>
> Is there a way in new() on a plugin to get the current repository?
>
> I'm tryng with:
>
> sub new
> {
> my( $class, %params ) = @_;
>
> my $self = $class->SUPER::new(%params);
>
> # $self->{priv} = # no specific priv - one per action
>
> #my $session = EPrints::Session->new();
> #my $repo_name = $session->get_repository->get_id;
> my $repo_name =
> $self->{processor}->{eprint}->{session}->get_repository->get_id;
>
> also $self->{session}->get_repository->get_id;
>
> does not work... even an hack is ok for me. Thanks!
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/