Perl-Tidy

 view release on metacpan or  search on metacpan

docs/BugLog.html  view on Meta::CPAN

    # NEW: perltidy -gnu -bom
    $show = $top->Entry(
                        '-width' => 20,
                       )-&gt;pack(&#39;-side&#39; =&gt; &#39;left&#39;);</code></pre>

<p>In the following example a leading &#39;-&gt;&#39; was being lost. The NEW version keeps the leading &#39;-&gt;&#39; but has to give up on the -lp alignment because of complexity:</p>

<pre><code>        # input
        $_make_phase_arg = join(&quot; &quot;,
                           map {CPAN::HandleConfig
                                 -&gt;safe_quote($_)} @{$prefs-&gt;{$phase}{args}},
                          );

        # OLD: perltidy -gnu -bom
        $_make_phase_arg = join(&quot; &quot;,
                                map { CPAN::HandleConfig-&gt;safe_quote($_) }
                                  @{$prefs-&gt;{$phase}{args}},
                               );

        # NEW: perltidy -gnu -bom
        $_make_phase_arg = join(
            &quot; &quot;,
            map {
                CPAN::HandleConfig
                  -&gt;safe_quote($_)
            } @{$prefs-&gt;{$phase}{args}},
        );</code></pre>

<p>In the following example, a leading &#39;)-&gt;&#39; was being converted to a leading &#39;-&gt;&#39; due to the old b977 fix:</p>

<pre><code>    # Starting script
    $lb = $t-&gt;Scrolled(&quot;Listbox&quot;, -scrollbars =&gt; &quot;osoe&quot;
                      )-&gt;pack(-fill =&gt; &quot;both&quot;, -expand =&gt; 1);

    # OLD: perltidy -bom -gnu
    $lb = $t-&gt;Scrolled( &quot;Listbox&quot;, -scrollbars =&gt; &quot;osoe&quot; )

t/snippets8.t  view on Meta::CPAN

        deux
        trois
	';
----------

        'rt126965' => <<'----------',
my $restrict_customer = shift ? 1 : 0;
----------

        'rt15735' => <<'----------',
my $user_prefs = $ref_type eq 'SCALAR' ? _load_from_string( $profile ) : $ref_type eq 'ARRAY' ? _load_from_array( $profile ) : $ref_type eq 'HASH' ? _load_from_hash( $profile ) : _load_from_file( $profile );
----------

        'rt18318' => <<'----------',
# Class::Std attribute list
# The token type of the first colon is 'A' so use -nwrs='A' to avoid space
# after it
my %rank_of : ATTR( :init_arg<starting_rank>  :get<rank>  :set<rank> );
----------

        'rt27000' => <<'----------',

t/snippets8.t  view on Meta::CPAN

            params => "def",
            expect => <<'#10...........',
my $restrict_customer = shift ? 1 : 0;
#10...........
        },

        'rt15735.def' => {
            source => "rt15735",
            params => "def",
            expect => <<'#11...........',
my $user_prefs =
    $ref_type eq 'SCALAR' ? _load_from_string($profile)
  : $ref_type eq 'ARRAY'  ? _load_from_array($profile)
  : $ref_type eq 'HASH'   ? _load_from_hash($profile)
  :                         _load_from_file($profile);
#11...........
        },

        'rt18318.def' => {
            source => "rt18318",
            params => "def",



( run in 2.250 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )