File: delete-article-name-method.html

package info (click to toggle)
request-tracker5 5.0.7%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 80,216 kB
  • sloc: javascript: 191,898; perl: 87,146; sh: 1,412; makefile: 487; python: 37; php: 15
file content (15 lines) | stat: -rw-r--r-- 580 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<%INIT>
# This is used by t/web/articles-links.t. Since we fork off a server
# under most test configurations, and we need a way to run code in the
# middle of the test script, we have to play at shenanigans to delete
# RT::Article's Name method. Other options were a Plack::Middleware that
# eval'd code given by paths like /__perl/(.+) (is scary), a signal
# handler (fails under apache), and only running articles-links.t for
# inline tests (fails under apache and standalone)

delete $RT::Article::{Name};

</%INIT>

<% RT::Article->can('Name') ? '{exists}' : '{deleted}' %>