3 # This spec file was automatically generated by cpan2rpm [ver: 1.146]
4 # The following arguments were used:
5 # --spec-only --version=2.0604 '--author=Andreas J. Koenig' Devel-Symdump-2.0604.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Devel
-Symdump
10 %define filelist
%{pkgname}-%{version}-filelist
11 %define NVR
%{pkgname}-%{version}-%{release}
14 name
: perl
-Devel
-Symdump
15 summary
: Devel
-Symdump
- dump symbol names or the symbol table
18 vendor
: Andreas J. Koenig
19 packager
: Arix International
<cpan2rpm@arix.com
>
21 group
: Applications
/CPAN
22 url
: http
://www.cpan.org
23 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
25 prefix
: %
(echo %{_prefix})
26 source: Devel
-Symdump
-2.0604.tar.gz
29 This little package serves to access the symbol table of perl.
33 =item "Devel
::Symdump
->rnew
(@packages
)"
35 returns a symbol table object
for all subtrees below @packages.
36 Nested Modules are analyzed recursively. If no package is given as
37 argument
, it defaults to "main". That means to get the whole symbol
38 table
, just
do a "rnew" without arguments.
40 The global variable $Devel
::Symdump
::MAX_RECURSION limits the
41 recursion to prevent contention. The default value is
set to
97, just
42 low enough to survive the
test suite without a warning about deep
45 =item "Devel
::Symdump
->new
(@packages
)"
47 does not go into recursion and only analyzes the packages that are
50 =item packages
, scalars
, arrays
, hashes
, functions
, ios
52 The methods packages
(), scalars
(), arrays
(), hashes
(), functions
(),
53 ios
(), and
(for older perls
) unknowns
() each
return an array of fully
54 qualified symbols of the specified
type in all packages that are held
55 within a Devel
::Symdump object
, but without the leading "$"
, "@" or
56 "%". In a scalar context
, they will
return the number of such
57 symbols. Unknown symbols are usually either formats or variables that
58 haven't yet got a defined value.
64 As_string
() and as_HTML
() return a simple string
/HTML representations
69 Diff
() prints the difference between two Devel
::Symdump objects
in
70 human readable form. The format is similar to the one used by the
77 Isa_tree
() and inh_tree
() both
return a simple string representation
78 of the current inheritance tree. The difference between the two
79 methods is the direction from which the tree is viewed
: top
-down or
80 bottom
-up. As I'm sure
, many users will have different expectation
81 about what is top and what is bottom
, I'll provide an example what
82 happens when the Socket module is loaded
:
84 =item % print Devel
::Symdump
->inh_tree
96 The inh_tree method shows on the left hand side a package name and
97 indented to the right the packages that use the former.
99 =item % print Devel
::Symdump
->isa_tree
112 The isa_tree method displays from left to right ISA relationships
, so
113 Socket IS A DynaLoader and DynaLoader IS A AutoLoader.
(Actually
, they
114 were at the
time this manpage was written
)
118 You may call both methods
, isa_tree
() and inh_tree
(), with an
119 object. If you
do that
, the object will store the output and retrieve
120 it when you call the same method again later. The typical usage would
121 be to use them as class methods directly though.
124 # This package was generated automatically with the cpan2rpm
125 # utility. To get this software or for more information
126 # please visit: http://perl.arix.com/
130 %setup -q
-n
%{pkgname}-%{version}
131 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
134 grep
-rsl '^
#!.*perl' . |
135 grep
-v '.bak$' |xargs
--no
-run
-if-empty \
136 %__perl -MExtUtils
::MakeMaker
-e 'MY
->fixin
(@ARGV
)'
137 CFLAGS
="$RPM_OPT_FLAGS"
138 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}|
if \$ExtUtils
::MakeMaker
::VERSION
=~
/5\
.9[1-6]|
6\
.0[0-5]/ '`
145 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
147 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
149 cmd
=/usr
/share
/spec
-helper
/compress_files
150 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
154 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
156 %{__mkdir_p} %{buildroot}/var
/adm
/perl
-modules
157 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
158 |
%{__sed} -e s+%{buildroot}++g \
159 > %{buildroot}/var/adm/perl-modules/%{name}
162 # remove special files
163 find
%{buildroot} -name "perllocal.pod" \
164 -o
-name ".packlist" \
168 # no empty directories
169 find
%{buildroot}%{_prefix} \
171 -exec rmdir {} \
; 2>/dev
/null
173 %{__perl} -MFile
::Find
-le '
174 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
176 for my $x
(sort @
dirs, @files
) {
177 push @ret
, $x unless indirs
($x
);
179 print join "\n"
, sort @ret
;
184 local $_
= $File
::Find
::name
;
185 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
186 return unless length
;
187 return $files
[@files
] = $_
if -f $f
;
190 /\Q$d\E
/ && return for reverse sort @INC
;
191 $d
=~
/\Q$_\E
/ && return
192 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
199 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
203 [ -z
%filelist ] && {
204 echo "ERROR
: empty
%files listing"
209 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
212 %defattr(-,root
,root
)
215 * Thu Nov
23 2006 root@dca02