File: Plugin.pm

package info (click to toggle)
tiarra 20100212-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,732 kB
  • ctags: 1,712
  • sloc: perl: 32,032; lisp: 193; sh: 109; makefile: 10
file content (87 lines) | stat: -rw-r--r-- 2,080 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
## ----------------------------------------------------------------------------
#  Auto::FetchTitle::Plugin.
# -----------------------------------------------------------------------------
# Mastering programmed by YAMASHINA Hio
#
# Copyright 2008 YAMASHINA Hio
# -----------------------------------------------------------------------------
# $Id: Plugin.pm 11369 2008-05-10 15:56:26Z hio $
# -----------------------------------------------------------------------------
package Auto::FetchTitle::Plugin;
use strict;
use warnings;

use Scalar::Util qw(weaken);

1;

# -----------------------------------------------------------------------------
# $pkg->new(\%config).
#
sub new
{
  my $pkg = shift;
  my $config = shift;
  my $this = bless {}, $pkg;
  $this->{config} = $config;
  $this->{hook}   = undef;
  $this;
}

# -----------------------------------------------------------------------------
# $pkg->config().
# (util)
#
sub config
{
  shift->{config}
}

# -----------------------------------------------------------------------------
# $pkg->notice($msg).
# (util)
#
sub notice
{
  my $this = shift;
  my $msg  = shift;
  defined($msg) or $msg = '';
  RunLoop->shared_loop->notify_msg($msg);
}

# -----------------------------------------------------------------------------
# $obj->register($context).
#
sub register
{
  my $this = shift;
  my $context = shift;

  #$context->register_hook($this, {
  #  name  => 'filter-name',
  #  'plugin.initialize' => \&plugin_initialize,
  #  'plugin.finalize'   => \&plugin_finalize,
  #  'filter.prereq'   => \&filter_prereq,
  #  'filter.response' => \&filter_response,
  #});
}


# -----------------------------------------------------------------------------
# End of Module.
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# End of File.
# -----------------------------------------------------------------------------
__END__

=encoding utf8

=for stopwords
	YAMASHINA
	Hio
	ACKNOWLEDGEMENTS
	AnnoCPAN
	CPAN
	RT